Message Boards Message Boards

0
|
3209 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

Newbie question on a Mathematica script

Posted 10 years ago
Appreciate tips on how write a Mathematica script that would 

1. Wait for user input, that contains a long string which includes blank spaces, i.e. no commas etc. 
 2. Do an integral over a predefined variable using input from Step 1.  
3. Use input from Step 2 above to do another integral over a predefined variable.  
4. Continue steps like 3, till the end.   5. Output written to both screen and a file that contains the name of the input.

Please note that the integrals are over DiracDeltas, and cannot be done as multiple integrals in one shot, it has to go step by step.
POSTED BY: Yaj Bhattacharya
A "Mathematica script" means something specific. Are you looking to write a program that runs in Mathematica or externally?

1. See the documntation for Manipulate on how to make simple user interfaces. You can make user interfaces that take an inputfield. For example:
Manipulate[Plot[f[x], {x, 0, 10}], {f, Tan}]
2. For example:
Manipulate[Integrate[x y, b], {b, x}]
3. This really wouldn't be much more of an addition to the previous example. Maybe it could be something like:
Manipulate[With[{firstResult = Integrate[x y, b]},
  Integrate[firstResult, z]
  ],
{b, x}]
4. You can use Export to export something to a file as a specific file format. In this case, you'll probably want a button that causes an export to happen. See this example from the documentation in Manipulate on how you can make a button:
Manipulate[x, {{x, 0}, Button["random", x = RandomReal[]] &}]
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract