MATLAB

mac2025-07-22  2

第五章习题:

第五章习题1:

>> x=[-4:0.2:4]; >> y=sin(x).^2./(1+x.^2); >> plot(x,y);

例题3

>> x=0:pi/20:2*pi; >> r=-cos(2*x); >> polar(x,r)

>> x=0:pi/20:2*pi; >> r=-cos(2*x); >> polar(x,r) >> [m,n]=pol2cart(x,r); >> plot(m,n)

例题5

Y = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9 >> bar(Y)

例题6.

>> V=[2200 1500 600 200 300 700]; >> V1=V/sum(V); >> [m,i]=max(V1); >> explode=zeros(size(V1)); >> explode(i)=1; >> pie(V1,explode)

最新回复(0)