MATLAB 第五次上机实验报告.doc
《MATLAB 第五次上机实验报告.doc》由会员分享,可在线阅读,更多相关《MATLAB 第五次上机实验报告.doc(5页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、 MATLAB 第五次上机实验报告Quit 3.31题%calculate x versus y1 and y2x=0:pi/10:2*pi; y1=sin(x); y2=cos(2*x);%plot y1 and y2; plot(x,y1,-ro,LineWidth,2,MarkerSize,6,MarkerEdgeColor,b,MarkerFaceColor,b) hold on plot(x,y2,-ro,LineWidth,2,MarkerSize,6,MarkerEdgeColor,b,MarkerFaceColor,b) hold off legend(sinx,cosx)2题
2、Write the MATLAB text string that will produce the following expressions 3题f(x) = sin cos2Answer: it f(x)=sintheta cos2phi4题4. Plot of x2 versus xAnswer: plot of Sigmax2 versus xWrite the expression produced by the following text sting:5题tauit_mAnswer: 6题bfitx_1 2 + x_2 2 rm(units:bfm2rm)Answer: 7题h
3、ow do you display the backslash()character in a text string?Answer : 3.8题% theta - Angle from microphone axis (radians)% g - A function of angle%Calculat g versus angletheta=-pi/2:pi/20:pi/2;g=abs(sinc(4*theta);%plot gpolar(theta,g,b-);title(bfAntenna Gain vs theta)3.11题 %define variables:% amp -Amp
4、litude response% c -Capacitance(farads)% f -frequency of input signal (Hz)% phase -phase response% r -resistance(ohms)% res -v0/ui%Initialize r & cr=16000; %16 k ohmsc=1e-6; %1 uff=1:2:1000;%calculate responseres=(j*2*pi*f*r*c)./(1+j*2*pi*f*r*c);amp=abs(res);phase=angle(res);%create plotssubplot(2,1
5、,1);% Create plotssubplot(2,1,1);loglog( f, amp );title(Amplitude Response);xlabel(Frequency (Hz);ylabel(Output/Input Ratio);grid on;subplot(2,1,2);semilogx( f, phase );title(Phase Response);xlabel(Frequency (Hz);ylabel(Output-Input Phase (rad);grid on;3.12题%define variables:% r -the distance of a p
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- MATLAB 第五次上机实验报告 第五 上机 实验 报告
限制150内