Saturday, February 7, 2015

Matlab Plotting

Welcome again, to my Matlab Blog!

In this tutorial, we will  discuss most powerful feature of Matlab, PLOTTING!

Let's define a vector with name 'x' and range from 0 to 10 with step size 0.1

Workspace showing Vector X 

Plot command is used to plot the data. Syntax of plotting is described below:

Plotting command

 After the execution of plot command, following window titled 'Figure 1' opened to show the results.

Plot Window

You can check the X and Y axis value at any instance by using/selecting 'Data Cursor' from the menu bar.

Plotting Menu

The results of plotting with activated data cursor.

Plotting window with Data Cursor
See you soon ... !

Matlab User Interface

Welcome, to tutorial regarding Matlab. Matlab 2013 will be used in this tutorial.

Maltab Splash Screen

You can run the Matlab application from start menu or from program files.

Main screen appears as the application starts.

Matlab Main Screen

You can simple treat main 'Command Window' as calculator. Any calculation can be performed and result will be populated in 'ans' variable.

Command Window

All declared variables with answer variable automatically included in the workspace. Types with min and max values of declared variables can be seen through workspace window.

Workspace Window

'Command History Window' keep track of the commands and will be accessed for future processing.

Command History Window

To clear/remove all commands from the 'Command Window' type 'clc' command in the 'Command Window'.

Similarly, workspace and command history window can also be cleared.

Clear Workspace

The command 'clear' is used to remove the variables from the workspace. Command 'Clear Variable Name' is used to remove specified variables where as command 'Clear all' is used to remove all variables from workspace.

Clear Command History
Thanks for your time. Your feedback is highly recommended. See you soon.