RE: Programming in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg45042] RE: [mg45039] Programming in Mathematica
- From: "David Park" <djmp at earthlink.net>
- Date: Sun, 14 Dec 2003 06:22:39 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
William, I don't know if you are contemplating using Mathematica and want to know about its interface or if you are already using it and have a specific question. In the latter case you could use, as part of your code, a statement such as airspeed = Input["Now enter the true airspeed: "]; That brings up a dialog box in which you can enter the value of airspeed. You could also program a palette for entering parameter values, or you could enter data in one notebook and generate output in a different notebook. But these take a little work and are NOT how I would use Mathematica as a student. (I consider the student mode as one of working through various text material by doing calculations and trying experiments. And building routines that do various subcalculations.) If you are just thinking about using Mathematica then I would HIGHLY recommend it. I believe that the standard Mathematica notebook interface is one of the best for studying technical material. You don't have to program an interface. Mathematica already has one and it is very much like writing on a sheet of paper. It has Section groupings that can be opened and closed to provide an outline style. You can have initialization cells that automatically initialize everything needed for the calculations in a notebook. If you have long input cells that aren't especially interesting, you can close them so only the output appears. In other words, you can create a well organized and elegant development just using the regular notebook interface. Rather than using a dialog box to enter data, I would use a construct like the following to perform a calculation with specific values of data. With[ {airspeed = 5.6, density = 0.015}, calculation statements that use airspeed and density... ] Then you can just change the data values and reevaluate the statement. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: William Alencar [mailto:william at h8.ita.br] To: mathgroup at smc.vnet.net Hi, I'm a aeronautical engineering student and I would like to know about programming in Mathematica. Has Mathematica a interface with the user like in other sytems or in Fortran? Is it possible, for instance, to give inputs in the middle of the evalution, like: "Now enter the true air speed: ". In other words, how can I write a notebook (like a m-file) and in another window, call this notebook and run it, giving inputs? I hope to be quite clear. I thank for examples or tutorials. Regards William Vaz de Alencar Technological Institute of Aeronautics Brazil