AllFreePapers.com - All Free Papers and Essays for All Students
Search

Matlab Codes and Graphs

Autor:   •  April 11, 2016  •  Lab Report  •  617 Words (3 Pages)  •  1,043 Views

Page 1 of 3

Program (2)

t=-3:0.01:3;

x = exp(t);

xrev= exp(-t);

plot(t, x, 'red', t, xrev, 'blue');

axis([-3 3 0 5]);

grid;

xlabel('time');

ylabel('blue showing time reversed version');

title('junaid shaikh, 05ES42');

[pic 1]

Program (3)

t=-3:0.01:3;

t1 = 1;

x = exp(t);

x1 = exp(t-t1);

t1=-1;

x2 = exp(t-t1);

plot(t, x, 'red', t, x1, 'green', t, x2, 'blue');

axis([-3 3 0 5]);

xlabel('time in secs');

ylabel('time delay & time advance');

title('junaid shaikh , 05ES42');

grid;

                                                                                            [pic 2]

                                                                     

                                                                Exercise 1

Write a Matlab program, which generates and plots function x(t)=sin(2πfot), its delayed version x(t-0.2) and, compressed version of the delayed signal, i.e., x(2(t-0.2)), and expanded version of the delayed signal i.e, x(0.5(t-0.2)).  Keep f0=1.

Program (1)  

 t=-5:0.01:5;          

 fo=1;w=2*pi*fo;

xo=sin(w*fo*t);

plot(t,xo, 'g');

title('junaid Shaikh , 05ES42');

ylabel('Sin(t)'); 

[pic 3]

Program (2)

t=-5:0.01:5;

t1=0.2;

 fo=1;w=2*pi*fo;

x1=sin(w*fo*(t-t1));

plot(t,x1,'b');

ylabel('Signal Delay ');

xlabel('time in secs');

title('junaid Shaikh , 05ES42');

grid;

                            [pic 4]

Program (3)

t=-5:0.01:5;

t1=0.2;

 fo=1;w=2*pi*fo;

x2=sin(2*w*fo*(t-t1));

plot(t,x2,'r');

xlabel('time in secs');

grid;

title('junaid Shaikh , 05ES42');

ylabel('Compressed signal');

Program (4)

[pic 5]

 t=-5:0.01:5;

 t1=0.2;

 fo=1;w=2*pi*fo;

x3=sin(0.5*w*fo*(t-t1));

plot(t,x3,'p');

ylabel('Signal Expansion');

...

Download as:   txt (3.6 Kb)   pdf (600 Kb)   docx (188.8 Kb)  
Continue for 2 more pages »