资源描述:
《东南大学Matlab作业2》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实用标准文档MatlabWorksheet2PartA(In-classroomexercises)1.Usingplottodisplaythefollowingvoltagewithappropriatelinetype,titleandlabels.Alsopresentthegraphwithsuitablerangesofaxis.wheref=50Hz.(Hint:timeintervalmustbesmallenough,e.g.0.001seconds.Therefore,t=0
2、:0.001:1isappropriate);Answer:Home_work_2_A_1.m%lbsin-class-exercise1_12013/8/21%functionUsingplottodisplaythefollowingvoltagewithappropriatelinetype,titleandlabels.Alsopresentthegraphwithsuitablerangesofaxis.%v(t)=220sin(2??ft)%wheref=50Hz.%Comment/
3、loopclearall;closeall;t=0:0.001:1;v=220*sin(2*pi*50*t);plot(t,v,'m','LineWidth',2)xlabel('t(sec)')ylabel('v(voltage)')title('v(t)=220sin(2??ft)')axis([00.2-260260]);gridon;文案大全实用标准文档1.Usingplottodisplaythefollowingvoltagewithappropriatelinetype,title
4、andlabels.Alsopresentthegraphwithsuitablerangesofaxis.wheref=50Hz.Inaddition,onthesamegraph,drawtheenvelopeoftheoscillationandaddlegends.Answer:home_work_2_A_2.m%lbsin-class-exercise1_22013/8/21%functionUsingplottodisplaythefollowingvoltagewithapprop
5、riatelinetype,titleandlabels.Alsopresentthegraphwithsuitablerangesofaxis.%v(t)=220exp(-5t)cos(2??ft)%wheref=50Hz.%Inaddition,onthesamegraph,drawtheenvelopeoftheoscillationandaddlegends.%Comment/loopclearall;closeall;t=0:0.001:1;v=220*exp(-5*t).*sin(2
6、*pi*50*t);plot(t,v,'m','LineWidth',2);xlabel('t(sec)')ylabel('v(voltage)')title('v(t)=220exp(-5t)cos(2??ft)')holdon;v1=220*exp(-5*t);plot(t,v1,'b','LineWidth',2);holdon;plot(t,-v1,'b','LineWidth',2);holdoff;legend('theoscillation','theenvelopeoftheos
7、cillation');axis([01-220220]);gridon;文案大全实用标准文档1.Usesubplot,drawa2by2arrayofplotsforthefollowingfunctions:Applyappropriatelinetype,title,labelsandaxisrangesforthegraphs.Answer:home_work_2_A_3.m%lbsin-class-exercise1_32013/8/21%functionUsesubplot,draw
8、a2by2arrayofplotsforthefollowingfunctions:%v1=cos(10*pi*t);v2=exp(-5*t).*v1;v3=exp(-10*t).*v1;v4=exp(-20*t).*cos(10*pi*t)%Applyappropriatelinetype,title,labelsandaxisrangesforthegraphs.%Comment/loopt=0:0.001:1;v1=cos(10*pi*t);v2=exp(-5*t).*v1;v3=exp(