Frequently Asked Questions (FAQ's)


How do I start Matlab?


How do I download files from the Web?

Right-Mouse-Click on the link, and select "Save Link As" option. A file dialog box will open, and save the file in the directory you wish.

Shift-Left-Mouse-Click is a shortcut which will sometimes work.


How do I load a file into Matlab?

If you download a Matlab m-file (ending with a .m extension) use the commands (in the Matlab command window)

to get to the location where you saved the files. To run an m-file, type the name of the file (without the .m extension) in the command window.

Matlab m-files are, for the most part, ascii files which can be viewed an edited. By the way, this is a good way to learn Matlab functions and programming!


How do I plot (2d) a function in Matlab?

The easiest way is the following:

  1. Decide how many points you want on the interval, (a,b). Then set up an array of x values by
    >> x = linspace(a,b,N);
    This means "divide up the interval (a,b) into N equally spaced sub intervales".
  2. Apply your function
    >> y = f(x);
  3. Now plot
    >> plot(x,y)
  4. Once the plot window opens, you can edit the plot. You can also print the plot, and export it in various formats