How to use Matlab m-files and diary files Math 305 The "command window" is the window in which you enter commands. You can clear it of old junk by clicking on the EDIT button, going down to and clicking on "Clear Command Window". An m-file is a list of commands and text comments. It is a text file with extension .m. It can be created with by any text editor, although MS-Windows versions of Matlab have a built in m-file editor. Your first step then is to figure out how to make an m-file on your system. A sample m-file is attached. The m-file is run or executed from the command window, by typing its name (without the .m). The one I made is called "probsetA.m," so I would need to type "probsetA." A line preceded by the percent symbol (%) is a comment, and will be displayed verbatim. Otherwise, Matlab will execute the line as a Matlab command. If there is an error Matlab will print a (probably useless) error message, and then stop. You go back to the m-file and fix it up and try again. It is expected that you will learn a lot by trail & error. Thus, you should never copy someone else's work, as you will not learn much that way. In your homework you should use comments to explain what you are doing. One can then print the output from the command window. However, you can also direct the output of the m-file to output file called a "diary" file. I have done this in my example. A diary file is a simple text file (with extension .txt). Thus, m-files are input file and diary files are output files. For your homework, turn in only the output, but use the "echo on" command so I can see the commands you used. Note that graphs appear in separate windows. Make sure your graphs are well labeled; the label should indicate which problem the graph is for. You should read Chapter 4 of the Matlab book for more information. Your first Matlab assignment is to do all of Problem Set A; see pages 47-49 of the Matlab book.