Sie sind auf Seite 1von 2

Tutorial (T)and laboratory exercise (E) on MATLAB

T1. For any given matrix A of dimension M*N having real valued elements only, try commands A'
{transpose of A} and A(:) {transfomation of a matrix to column vector}. Analyze the outcomes.

T2. For any arbitrary finite size vector B of dimension N*1, try commands A*B {matrix-vector
product} and B.*B { vector dot product}. Verify that outcome of commmands B*B' and B'*B are
not same.

T3. For any array C {column vector or row vector} try commands size (C) and sum (C).

T4. For a finite size matrix A, try sum (A), mean (A) and diag (A).

T5. Logical testing { relational and logical operators}and looping , try following samle modules

T5.1 clear all
x=5;
y=6;

if (x ==5)
disp ('equality verified');
end

T5.2 if ( (attendance >= 0.90) & (grad_average >=6) )
pass = 1;

else
fail = 1;

end;

T6. Let a given array is x = [ 4 3 8 9 2];

>> [array index ] = sort (x)

T7. Plots and graphs
Try following module
clear all
>> x = 0: pi/200: 2*pi;
signal_1 = sin (x*10);
signal_2 = sin (x*10) + cos (x*15);

plot (signal_1);
hold on;
plot (signal_2);

Also explore uses of command s xlabel, ylabel, grid etc.

T8. Explore purpose of commands clear all and close all.


E1. Using commands ones (1, N) and zeros (1, N), stem generate and sketch the sequences; unit
sample, unit step, delayed unit sample, delayed unit step for finite fixed delay M where, N>M.

E2. Generate and plot each of the following sequences over the stated interval, also estimate the
average power and total energy for each of these

a. x(n) = 2 (n+2) (n-4), -5 n 5.

b. x(n) = n [u(n)- u(n-10)] +10 exp(-0.3(n-10) ). [u(n-10)- u(n-20)], 0 n 20. .

E3. Create functions for addition and multiplication operations on a given finite length sequences.

E4. Verfiy the CAD (Commutative, Associative, and Distributive) properties on all three kinds of
amplitude and time transformations operation on a given finite length sequence.

E5. Design a MATLAB function to decompose a given finite length sequence, x(n), into its even
and odd components. Sketch all three sequences.

Das könnte Ihnen auch gefallen