matlab plot 出现向量不一致? 100
需要怎样改functiontulunr=50;e=15;h=25;S0=(r^2-e^2)^1/2;symsSaa1=0:(pi/100):75*pi/180;S1=12...
需要怎样改
function tulun
r=50;
e=15;
h=25;
S0=(r^2-e^2)^1/2;
syms S a
a1=0:(pi/100):75*pi/180;
S1=12.5/(75*pi/180)*a1.^2;
a2=75*pi/180:(pi/100):150*pi/180;
S2=-(50/(150*(pi/180)^2))*a2.^2+(100/(150*pi/180))*a2-25;
a3=150*pi/180:(pi/100):pi;
S3=-(50/(150*(pi/180)^2))*(150*pi/180)^2+(100/(150*pi/180))*(150*pi/180)-25;
a4=pi:(pi/100):3*pi/2;
S4=12.5*(1-cos(a4/2));
a5=3*pi/2:(pi/100):2*pi;
S5=0;
a=[a1,a2,a3,a4,a5];
S=[S1,S2,S3,S4,S5];
figure(1);
plot(a,S);
end 展开
function tulun
r=50;
e=15;
h=25;
S0=(r^2-e^2)^1/2;
syms S a
a1=0:(pi/100):75*pi/180;
S1=12.5/(75*pi/180)*a1.^2;
a2=75*pi/180:(pi/100):150*pi/180;
S2=-(50/(150*(pi/180)^2))*a2.^2+(100/(150*pi/180))*a2-25;
a3=150*pi/180:(pi/100):pi;
S3=-(50/(150*(pi/180)^2))*(150*pi/180)^2+(100/(150*pi/180))*(150*pi/180)-25;
a4=pi:(pi/100):3*pi/2;
S4=12.5*(1-cos(a4/2));
a5=3*pi/2:(pi/100):2*pi;
S5=0;
a=[a1,a2,a3,a4,a5];
S=[S1,S2,S3,S4,S5];
figure(1);
plot(a,S);
end 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询