matlab is one of some commercially available sophisticated mathematical computational tools that is used in the industry. For example, Boeing claims that Boeing-777 was the first aircraft in the world developed using matlab. Later its manufactured prototypes ware tested in wind tunnels and these tests confirmed predicted model's parts.

To begin matlab session, use your mouse to click on the matlab icon (which should be located on the desktop) or use the start menu. If you are using LINUX (or Mac) operating system, type matlab at the prompt. You should see the matlab prompt ≥≥, which tells you that matlab is waiting for you to enter a command. The first command we recomemnd to execute is ver that will provide you what version of matlabmatlab, type quit or exit at the matlab prompt, or choose EXIT MATLAB from the file menu, or select the close icon (x) from the upper right-hand corner of the screen.

matlab front page

The start button is located in the lower left-hand corner of the matlab window, and it offers alternative access to the matlab toolboxes provide additional matlab functionality for specific content areas.

matlab uses display windows. The default view shown below.

figure???

It includes a large command window in the center, the current folder window on the left, and the workspace and command history windows on the right. In addition, document windows, graphics windows, and editing windows will automatically open when needed.

matlab includes extensive help tools. To use the command-line help function, type help in the command window. A list of help topics will appear. To use the windowed help screen, select Help → matlab Help from the menu bar. A windowed version of the help list will appear.

 

Command Window


You can use matlab in two basic modes. The command window offers an environment similar to a note pad. Using the command window allows you to save the values you calculate, but not the commands used to generate those values. If you want to save the command sequence, you will need to use the editing window to create an m-file (m-files are discussed in the section).

You can perform calculations in the command window in a manner very similar to the way you perform calculations on a scientific calculator. Most of the syntax is even the same. For example,

Or to use trigonometric function to find the value of sin(π), type
or

 

Command History Window


The command history window records the commands you issued in the command window. When you exit matlab, or when you issue the clc command to clear all commands, the command window is cleared. However, the command history window retains a list of all of your commands. You may clear the command history using the edit menu if you need to.

 

Workspace Window


The workspace window keeps track of the variables you have defined as you execute commands in the command window.

 

Document Window


Double clicking on any variable listed in the workspace window automatically launches document window containing the array editor. Values stored in the variable are displayed in a spreadsheet format. You can change values in the array editor, or you can add new values. For example, if you have not already entered the two-dimensional matrix M, enter the following command in the command window


M = [1,2,3,4; 5,6,7,8; 9,0,1,2];
Placing a semicolon at the end of the command suppresses the output to that it is not repeated back in the command window; however, M should now be listed in the workspace window. Double click it. A document window will open above the workspace window, as shown below.

figure???

The document window that displays the array editor can also be used in conjunction with the workspace window to create entirely new arrays. Run your mouse slowly over the icons in the shortcut bar at the top of the workspace window. The function of each icon should appear, if you are patient. The new-variable icon looks like a page with an asterisk at its upper-left corner. Select the new-variable icon. A new variable called unnamed should appear on the variable list. You can change its name by right-clicking and selecting rename from the pop-up menu. To add values to this new variable, double click on it and add your data from the document window.

 

Graphics Window


the graphiics window launches automatically when you request a graph. To create a simple graph, create an array of x-values:


x = [1,2,3,4,5];
Now create a list of y-values:

y = [11,12,13,14,15];
To create a graph, use plot command

plot(x,y)
The graphics window opens automatically.
Two n-by-n matrices A and B are called similar if there exists an invertible n-by-n matrix S such that