文档详情

控制系统仿真(MATLAB)实验1-6..doc

发布:2017-01-10约9.81千字共10页下载文档
文本预览下载声明
控制系统仿真(MATLAB) 实验指导书 青岛大学自动化工程学院 2006年4月 MATLAB实验一 一、实验目的: 1. Be familiar with MATLAB Environment 2. Be familiar with array and matrix Be familiar with MATLAB operations and simple plot function 二、实验内容: 1. Be familiar with Matlab 6.5 Startup Matlab 6.5, browse the major tools of the Matlab desktop The Command Windows The Command History Windows Launch Pad The Edit/Debug Window Figure Windows Workspace Browser and Array Editer Help Browser Current Directory Browser 2. Give the answer of the following questions for the array What is the size of array1? What is the value of array1(4,1)? What is the size and value of array1(:,1:2)? What is the size and value of array1([1 3],?end)? 3. Give the answer of the following commad 1) a=1:2:5; 2) b=[a’ a’ a’]; 3) c=b(1:2:3,1:2:3); 4) d=a+b(2,:) 5) w=[zeros(1,3)?ones(3,1)’?3:5’] 4. Give the answer of the sub-arrays 1) array1(3,:); 2) array1(:,3); 3) array1(1:2:3,[3 3 4]) 4) array1([1 1],:) 5. Give the answer of the following operations 1) a+b 2) a*d 3) a.*d 4) a*c 5) a.*c 6)a\b 7) a.\b 8)a.^b 6.Solve the following system of simultaneous equations for x 7.Edit Run the m-file % test step response function wn=6; kosi=[0.1:0.1:1.0 2]; figure(1); hold on for kos=kosi num=wn^2; den=[1,2*kos*wn,wn.^2]; step(num,den) end hold off; 8.Edit Run the m-file % test plot function x=0:pi/20:3*pi; y1=sin(x); y2=2*cos(2*x); plot(x,y1,rv:,x,y2,bo--); title(Plot the Line of y=sin(2x) and its derivative); xlabel(X axis); ylabel(Y axis); legend(f(x),d/dx f(x)); grid on; 9. Edit Run the m-file % test subplot and loglog function x=0:0.1:10; y=x.^2-10.*x+26; subplot(2,2,1); plot(x,y); grid on; subplot(2,2,2); semilogx(x,y); grid on; subplot(2,2,3); semilogy(x,y); grid on; subplot(2,2,4); loglog(x,y); grid on; 10.Edit Run the m-file % test max and plot function volts=120; rs=50; rl=1:0.1:100; amps=volts./(rs+
显示全部
相似文档