A blog to help electrical engineers and students to learn electrical engineering topics. Basic Electrical Engineering, Power Systems, Electrical Machines, tec.. Now special course on MATLAB for Beginners.

Class

Class

Friday, January 22, 2016

Familiarize MATLAB Work Environment

 
(Figure courtesy: https://www.cs.uic.edu/~jbell/CourseNotes/Matlab/Introduction.html)
Figure 1. A typical MATLAB Desktop

The MATLAB Work Environment or MATALB Desktop is the main Matlab application window. It has four sub-windows – Command window, Command history, Workspace and Current Directory as shown in the Figure 1. A Start button is provided on the lower left side, which is used to access MATLAB tools and features. Mathworks made some big changes in the work environment in its latest release 2015b. A screen shot of the latest MATLAB Desktop is shown in Figure 2.

(Figure courtesy: https://www.cs.uic.edu/~jbell/CourseNotes/Matlab/Introduction.html)
Figure 2. A new view of MATLAB Desktop
 Command Window:
The Command Window is where you type in Matlab commands and expressions at the prompt (») and where the output of your command will be displayed. Command window is used to
  • Execute commands
  • Open the windows
  • Run the programs
  • Manage the MATLAB software

Figure 3. Command Window
Workspace Browser:
The Workspace shows the list of variables that are currently defined in a work session, and other information about the variables (type, size , value, etc.). It keeps track of variables you have defined as you execute the commands.
·         Note: 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.
·         Double click on a variable in the Browser and the Array Editor gets launched, which can be used to obtain information and sometimes edit properties of the variable.
Current Directory:
The Current Directory window, as its name suggests, displays the contents of the current working directory.
  • Double click on any file to open it.
  • Right-click on Matlab scripts and function files to execute the commands contained therein.
  • Right-click on data files to import the data as Matlab variables.

Current directory can be changed by clicking on folders or use the Current Working Directory text box at the top of the Matlab working environment.
Command History:
The Command History window contains a list of commands a user has entered recently in the Command Window, including both current and previous Matlab sessions.
·         To execute a command in command history, double click on the command
·         A command can be dragged to the command window and modified before execute again
·         The entries in the command history can be removed by selecting the command and press ‘Delete’
·         To delete entire command history, Right click and select Clear Command history.
·         These windows may be re-arranged according to your personal preferences, including dragging windows away from the Matlab work environment. In addition to these sub windows there are other special windows used to for special purposes.
Figure Window:
Figure window is shown only when the user displays a graphic. It is automatically opened after any command that draws a figure. Any additional figures you create will overwrite the figure unless you specifically command to open a new Figure window. A sample figure window is shown in figure 4.

Figure 4. Figure Window
Editor Window:
The Editor Window is the window used for writing and editing MATLAB programs. This window can be opened from command window by ‘edit’ command of from the Menu, by selecting File --- New --- mFile (Script). An example of an Editor Window is shown in Figure 5.

Figure 5. Editor Window
Help Window:
The Help Window contains help information. This window can be opened from the Help menu in the toolbar of any MATLAB window. The Help Window is interactive and can be used to obtain information on any feature of MATLAB. 
submit to reddit

0 comments:

Post a Comment