BÁO CÁO LAB 1

Please download to get full document.

View again

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
 46
 
  BÁO CÁO LAB 1 Môn: Xử lí tín hiệu số Giảng viên: Phạm Văn Tuấn Sinh viên : Trần Lộc Exercise 1 Scripts Now we are going to edit the dampedCosine.m le to create our own script le. At the top of the le, you will see the following commands diary 'your_name_Lab1.txt' disp('NAME: your name') disp('SECTION:your section') 1. Edit the dampedCosine.m (download from link above) script and enter your name and section where indicated. Save this new version of the script as yourName_dampedCosine.m 2. Edit t
Share
Transcript
    BÁO CÁO LAB 1   M ôn : X ử l í t  ín hi ệ u s ố   Gi ảng viên: Phạm Văn Tuấ n Sinh vi ê n : Tr  ầ n L ộ c Exercise 1 Scripts Now we are going to edit the dampedCosine.m le to create our ownscript le. At the topof the le, you will see the following commands diary 'your_name_Lab1.txt' disp( 'NAME: your name' )disp( 'SECTION:your section' )1. Edit the dampedCosine.m (download from link above) script and enter yourname and sectionwhere indicated. Save this new version of the script asyourName_dampedCosine.m 2. Edit the script to create a second signal where the cosine with twice the period(which giveshalf the frequency) of the first.  3. Add to the script the commands to plot these together with the first signal on  ấ  nsecond on the bottom. In other words, you should have a single gure with twodierentplots, one on top and one on bottom. You will need to use subplot and plot. Savethis plotas yourName_dampedCosine.fig.4. Show the TA your dampedCosine plot. What is the period of the cosine? dampedCosine.m CODE  ộ cdiaryyour_nameex1   %INSERT your name and section into these display commands   disp('NAME: your_name')   disp('SECTION: your_section')   datestr(cputime)   %dampedCosine.m produces a plot of a cosine with frequency 1 Hz, withamplitude   % scaled by a decaying exponentialfigure   x = -5:0.01:5;   y2=exp(-abs(x)).*cos(pi*x);   subplot(2,1,1);   plot(x,y2);   xlabel('time');   ylabel('amplitude');   title('f(x)=exp(-|x|)cos(pi*x)');    subplot(2,1,2);y1=exp(-abs(x)).*sin(0.5*pi*x);plot(x,y1);xlabel('time');ylabel('amplitude');title('f(x)=exp(-|x|)cos(0.5*pi*x)'); diary off    Exercise 2 Complex exponentials Download and run compexp.m2 , which includes a3-D plot of a complex exponential, y (t) , as well as 2-D magnitude/phaseand real/imaginary plots. You need 2 2-D plots to have the sameinformation as the 3-D plot. How would you change the script to makethe oscillation frequency lower by half? How would you change thescript to make the decay faster? Show the TA your plots %compexp.m produces a 3D plot of a decaying complex exponential,% with subplots of magnitude and phase and of real and imaginary % components below it.
Related Search
Similar documents
View more
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x