Wednesday 2 October 2013

The Matlab Development Environment

The most important features of the Matlab development environement are shown in the image below, and described in the bullet points that follow. Note that the Matlab environment is highly configurable, which means that it may not look exactly like this on your machine. ( You can try selecting Desktop -> Desktop Layout -> Default from the menubar, but that may still not give you this exact configuration, depending on your particular version. )

Five Important Windows

  • The Command Window is where you type in Matlab commands. These can be simple equations you want evaluated, or more complex expressions involving Matlab scripts or functions.
  • The Command History Window shows the commands you have entered in the past. You can repeat any of these commands by double-clicking on them, or by dragging them from the Command History Window into the Command Window. You can also scroll back to previous commnads by using the up arrow in the Command Window. When you learn how to edit Matlab script files or functions, you can also drag commands from the Command History Window into a file.
  • The Workspace shows the list of variables that are currently defined, and what type of variable each is. ( I.e. a simple scalar, a vector, or a matrix, and the size of all arrays. ) Depending on the size ( i.e. type ) of the variable, its value may also be shown.
    • If any of the variables in the Workspace are plottable, they may be plotted quickly and easily by right-clicking on the variable name and selecting a plot type.
      • Use the control key to select multiple variables for plotting.
      • The plot types shown on the resulting menu will depend on the ( dimensionality of ) the variable(s) that are selected.
  • The Current Directory Window shows the contents of the current working directory.
    • Double click on any file to open it in a ( text ) editor
    • Right-click on Matlab scripts and function files to execute the commands contained therein.
    • Right-click on data file to import the data as Matlab variables.
    • Change directories by clicking on folders or use the Current Working Directory text box at the top of the Matlab working environment.
  • The File Details Window shows full details of the files in the current working directory.
  • Windows may be re-arranged according to your personal preferences, including dragging windows away from the Matlab work environment.

Other Important Features

  • The Getting Started link leads to the Matlab tutorial system. Although it is tempting to jump ahead to what you are most interested in, new users are encouraged to go through the tutorials in the order in which they are presented.
  • The Help menu also provides a wide variety of useful sources of help.
  • The Function Catalog ( if available ) provides a full list of every Matlab function, including installed toolboxes, in a neatly organized manner complete with full pop-up help descriptions of each function.
  • The menu bar and tool bar are context-sensitive, which means that they change depending on which of the five major windows is active. ( They are also configurable according to your personal preferences. )

No comments:

Post a Comment