Back to the Control Room



Start

How do I start?



By now, you are probably in the Matlab command window. Although commands can be executed directly from the command window by typing them in at the command prompt (LLUNIX/CLC: Long Live UNIX and command-line compilers!), it may be better practice to write your program in a file and, after saving the file, to run it from the command prompt.

In order to do this, go to the File menu and select New->Mfile. Type in the program (see the next section), and then save the file. Make sure to save before running, and to give the file the extension .m if you are using the PC or UNIX (if you are using the M-word, take a course on late 20-th century techno-cultural ethics).

In order to run the program after saving it, go back to the command window, and type in the name of the file you just saved (without the .m). If the program involves graphics, a window with the graphics will pop up automatically.