### Matlab Programming Tutorial

Matlab Programming Tutorial for development environment engineers and scientists. Matlab is a programming language and computing environment which is used to allow for powerful image analysis and manipulation. Matlab is mostly used to solve computing problems in a faster manner. Matlab is to be used for scripting, graphing and simple calculations. Matlab should support external interfaces like c, c++, java, COM, Excel and .NET.

Matlab Programming Components:

• Operators
• Variables
• Matrix
• Matlab Expression
• Matrix

Uses of Matlab:

• Exploring Data
• Annotating Graphs
• Printing and Exporting Graphs
• Saving graphs for reuse
• Editing graph component

## MATLAB PROGRAMMING TUTORIAL

1.M-files as matlab files which contains scripts or functions.

2.Store Matlab Command Lines.

3.Execute all of the command lines presented in a command window have to run a particular m-file.

#### Matlab Programming Tutorial on Line Plotting:

%% Line plots
%To create two-dimensional line plots,
%plot the value of the sine function from 0 to $2\pi$:
X=0:pi/100:2*pi;
Y=sin(x);
Plot (x,y)
%%
% label the axes and a title
Xlabel (‘x’)
Ylabel (‘sin(x)’)
Title (‘Plot the sine function’)
%%
% By adding a third input argument plot the same variables using a red dashed line
Plot (x.y.’r—‘)
%%