Matlab assignment 1

Matlab assignment 1 - Astha Kalia UID: 803791434 10/14/2011...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Astha Kalia UID: 803791434 10/14/2011 MatLab Assignment #1 1.) >>t=0:.1:10 >> w=exp(-t); >> x=t.*exp(-t); >> y=exp(-t)+ t.*exp(-t); >> plot(t,w); >> grid on; >> xlabel('t(sec)'); >> ylabel('w(volts)'); >> title('sample waveform w vs. time'); 2.) >> plot(t,w,t,x,t,y); >> grid on; >> xlabel('t(sec)'); >> ylabel('w,x,y (volts)'); >> title('Sample waveforms w,x and y vs. time'); >> % Now we are going to continue on to task 1 3.) TASK 1 >>t=-5:.1:5; >>x=exp(-(t.^2)).*cos(2*pi*t); >>plot(t, x) >>xlabel('t (sec)'); >>title('Task 1'); 4.) >> A=3; >> x=cos(2*pi*A*t); >> B=4; >> y=sin(2*pi*B*t); >> t=0:.001:1; >> plot(x,y); >> grid on; >> xlabel('x(t)'); >> ylabel('y(t)'); >> title('Lissajous curve'); 5.) >> A=19; >> x=cos(2*pi*A*t); >> B=20; >> y=sin(2*pi*B*t); >> t=0:.001:1; >> plot(x,y); >> grid on; >> xlabel('x(t)'); >> ylabel('y(t)'); >> title('Lissajous Curve A=19 B=20'); >> % start of task 2 6.) >> dr=0:0.1:1.0 >> dc=ones(1,10); >> t=-2:0.2:2; >> x=[dr dc] >> plot(t,x); >> grid on; >> xlabel ('time'); >> ylabel('x'); >> title('x vs. t'); >> % Now we are moving on to task...
View Full Document

This note was uploaded on 03/30/2012 for the course ELEC ENGR 102 taught by Professor Lee during the Fall '11 term at UCLA.

Page1 / 13

Matlab assignment 1 - Astha Kalia UID: 803791434 10/14/2011...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online