,急求,matlab如何由二维图旋转生成三维图
clc;clearall;symsvx;v1=zeros();x=zeros();w=50;r2=1;e=0.6;i=1;r3=0.7;fork=0:(e+r2)/100...
clc;clear all;
syms v x ;
v1=zeros();x=zeros();
w=50;r2=1;e=0.6;i=1;r3=0.7;
for k=0:(e+r2)/100:(e+r2)
x(i)=k;
if k>r2-e
v1(i)=acos((k*k+e*e-r2*r2)/(2*k*e))-acos((k*k+e*e-r3*r3)/(2*k*e));
else
v1(i)=pi;
end
i=i+1;
end
N=length(x);
f=max(v1);
v=v1./f;
q=max(x);
y=x./q;
plot(x,v,'k'),grid off;
xlabel('归一化半径r','fontsize',10);
ylabel('归一化去除量R(r)','fontsize',10);
title('平转动','fontsize',10);
将该图形绕着y轴旋转 展开
syms v x ;
v1=zeros();x=zeros();
w=50;r2=1;e=0.6;i=1;r3=0.7;
for k=0:(e+r2)/100:(e+r2)
x(i)=k;
if k>r2-e
v1(i)=acos((k*k+e*e-r2*r2)/(2*k*e))-acos((k*k+e*e-r3*r3)/(2*k*e));
else
v1(i)=pi;
end
i=i+1;
end
N=length(x);
f=max(v1);
v=v1./f;
q=max(x);
y=x./q;
plot(x,v,'k'),grid off;
xlabel('归一化半径r','fontsize',10);
ylabel('归一化去除量R(r)','fontsize',10);
title('平转动','fontsize',10);
将该图形绕着y轴旋转 展开
1个回答
展开全部
clc;clear all;
syms v x ;
v1=zeros();x=zeros();
w=50;r2=1;e=0.6;i=1;r3=0.7;
for k=0:(e+r2)/100:(e+r2)
x(i)=k;
if k>r2-e
v1(i)=acos((k*k+e*e-r2*r2)/(2*k*e))-acos((k*k+e*e-r3*r3)/(2*k*e));
else
v1(i)=pi;
end
i=i+1;
end
N=length(x);
f=max(v1);
v=v1./f;
q=max(x);
y=x./q;
subplot(121);
plot(x,v,'k');
grid off;
% xlabel('归一化半径r','fontsize',10);
% ylabel('归一化去除量R(r)','fontsize',10);
% title('平转动','fontsize',10);
t = (0:0.01:2)*pi;
X = x;
Y = real(v);
subplot(122);
surf(repmat(Y,length(t),1),cos(t)'*X,sin(t)'*X);
shading interp
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询