
Array editor is used for viewing and editing a visual representation of variables in workspace.

In the Workspace Browser double click on a variable to see it in the Array Editor. While reading the documentation, you can bookmark any page, print a page, search for any term in the page and copy or evaluate a selection. Use HELP browser for the finding the information, indexing, searching and Demos. To open the Help browser, click on the HELP button in the MATLAB desktop tools or alternate for HELP browser is to go to command window and type help browser. After saving the M-file, you can even call it directly by typing the file name in command history. An M-file consists of one or more commands to execute. For reading it in next session you have to import that file, by clicking on FILE then IMPORT DATA.Įditor is a word processor specifically designed for creating and debugging M-files. For saving it for later MATLAB session, click on Workspace Action Icon then SAVE, this will save your workspace into a MAT-file, with an extension of “.mat”. As you exit from MATLAB, it automatically clears the workspace. For deleting variables from the workspace, select any particular variable click on EDIT then DELETE. MATLAB workspace consists of set of variables made during the time of performing mathematical operations, running saved M-files, and loading saved workspaces.
#For loop in matlab code
M-File is nothing but a text file which contains MATLAB code Also, you can create an M-file for selected statement. Even we can select any previously entered function or line and execute it. It means the function or lines you entered in the Command window is also visible in the Command History window. Now, for performing simple mathematical operation like addition and subtraction, lets take any two numbers 12 and 14.Ĭommand history means the history of the command window. If we want to make a row vector with increment by 2 then simply write » u = u = 0 2 4 6 8Īnd for decrement by 2 » u = u = 12 10 8 6 4 2 If we want to make a row vector from 0, 1, 2, 3, 4, 5, 6, 7, 8 then we can simply write as » a = a = 0 1 2 3 4 5 6 7 8
