Professional Documents
Culture Documents
PRACTICAL FILE
SUBMITTED
BY:NISHANTKUMAR
INDEX
S.NO NAME OF
EXPERIMENT
1.
2.
3.
4.
5.
6.
7.
8.
9.
Introduction to
matlab.
Basic matrix
operations.
Plot and solve
various
functions
Basic 2-D and
3D plots.
To find closed
loop transfer
function of
system
To generate sine
wave,cosine
wave and
exponential
curve.
Plot the transfer
function
Open loop
transfer
function
To find root
locus for given
system.
PAGE DATE OF
DATE OF
REMARKS
NO.
EXPERIMENT SUBMISSION
12/08/14
19/08/14
19/08/14
26/08/14
26/018/14
2/09/14
2/09/14
9/09/14
9/09/14
16/09/14
16/09/14
23/09/14
23/09/14
30/09/14
30/09/14
07/10/14
07/10/14
14/10/14
Experiment -1
Introduction to matlab
Matlab :
The edit command in the above section shows you a very basic M files for the
acosd
SCALAR VARIABLES:
Scalars
In matlab a scalar is a variable with one row and one column. Scalars are the simple
variables that we use and manipulate in simple algebraic equations.
Creating scalars
To create a scalar you simply introduce it on the left hand side of an equal sign.
>>x=1;
>>y=2;
>>z=x+y;
Scalar operations
Matlab supports the standard scalar operations using an obvious notation. The following
statements demonstrate scalar addition, subtraction, multiplication and division.
>> u=5;
>>v=3;
>>w=u+v
>>x=u-v
>>y=u*v
>>z=u/v
Vectors:
In matlab a vector is a matrix with either one row or one column.the distinction berween
row vector and column vector is essential . many programming errors are causedby
using a row vector where a column vector is required ,and vice versa.
MATLAB vector are used in many situations, e.g,creating x-y plots, that do not fall under
the rubric of linear algebra. In these con texts a vector is just a convenient data
structure.
MATLAB still enforces the rules of linear algebra so paying attention to the details of
vector creation and manipulation is always important.
Creating vectors
To create a vector you simply introduce it on the left hand side of an equal sign. Of
course this means that the expression on the right side of the equal sign must evaluate
to a vector . There are numerous ways to actually create a vector, each one having
Advantages in particular situations.
EXPERIMENT-2
AIM: BASIC MATRIX OPERATION
EXPERIMENT -3
3.
X= linspace(0,10,200);
g= x.^3+1;
h=x+2;
z= x.^2;
y= cos(x.*pi);
F=y*z./g*h;
X2 COSX/(X3+1)(X+2)
EXPERIMENT -4
AIM:BASIC 2-D AND 3-D PLOTS.
> X = 0 : . l. : 2. 0 ;
y = exp(O.l*x) .*sin(x);
plot (x, y)
x1abel (I Time (t) in Sedorids1)
ylabel (I The Response Amplitude in mtn I)
title ( 1 A Simple 2 -D Plot 1 )
PROGRAM:
r = inline('1+2*(sin(2*t)).-2');
ezpolar(r)
EXPERIMENT-6
1.Program to generate sine wave