Monday, April 29, 2024

Matlab command windows

Must read

COMMAND HISTORY:

Command history is to the left side of the command window, used to display the statements which you run in the previous and current session. Which stores a maximum of 20,000 bytes it delete the oldest statements when it more than 20,000 bytes.

To delete entries in the Command History window, select an entry, or Shift+click or Ctrl+click to select multiple entries, or use Ctrl+A to select all entries. From the context menu by right-clicking select one of the delete options. Another method for clearing the command history click on the edit menu click on clear history.

EDITOR WINDOW:      

In the editor window you can write the program or script file (with the extension of .m).which consist of one or more than one commands will be executed once the program is saved. 

FIGURE WINDOW:

Figure window is used to represents your results in graphical form

Syntax

Create a figure graphics object:

Figure
Figure ('Property Name’, Property Value...)
Figure (h)
h = figure (...)
 

Here command is used to enlarge the figure

Figure (‘units’,’ normalized’, ‘position’, [0 0 1 1]);

HELP WINDOW:

Which provides complete information regarding matlab, Help window help us to search for a document and also view of the documentation and demonstrations of a MATLAB and all other Math Works products installation. MATLAB will automatically provide the installation of a documentation and demos of a product when you want install that product. Then click the Help button in the desktop toolbar,

  • Type help browser in the Command Window, or use the Help menu in any tool. There are two panes:

CURRENT DIRECTORY:

 By using the current directory field in the desktop toolbar, shown here view or change the current directory.

In MATLAB, Current Directory browser is useful for searching, viewing and help us to open and make some changes to MATLAB related directories and files. Alternatively, we can use the dircd, and delete functions. Visual Directory and Directory Reports functions will help you manage M-files.

WORKSPACE WINDOW:

It is used to display the current variables and you can view the value of variables in the Value column of the Workspace browser. The MATLABworkspace command window will help you to create and store in memory of the variables during a MATLAB session.

LAUNCH PAD WINDOW:

Provides the access to Toolboxes, SIMULINK, demos etc.

USE OF SEMICOLON (;) IN MATLAB:

Semicolon (;) can used to separate the commands written in the same lines. Which used to indicate end of statement.

For example:

X=4;

Y=2;

Z=x+y;

USE OF COLON (;) IN MATLAB:

The colon (:) operator plays an important part in MATLAB. Which help us to create subscript arrays, specify for iterations and vector.

Let consider an example create a row vector, containing integers from 11 to 20, you write

 For script 11:20

Ans = 11 12 13 14   15 16 17 18 19 20

  • Creating a list of numbers.
  • Possible of collapsing trailing dimensions.
  • Useful for creating a column vector.
  • Hold on an array shape during the assignment.
  • Works on all the entries in specified dimensions.

- Advertisement -

More articles

- Advertisement -

Latest article