matlab中axes怎样实现多个函数图像叠加
这是写函数图像的那段,用holdon不行啊,只能显示最后的。本人刚学matlab,请大家多帮忙!xx=x3:0.001:x1;yy1=sqrt(t13.^2-(xx-(x...
这是写函数图像的那段,用hold on不行啊,只能显示最后的。本人刚学matlab,请大家多帮忙!
xx = x3:0.001:x1;
yy1 = sqrt(t13.^2-(xx-(x1+x3)/2).^2);
yy2 = -sqrt(t13.^2-(xx-(x1+x3)/2).^2);
axes(handles.axes1);
plot(xx,yy1,xx,yy2);
hold on;
xxx = x3:0.001:x1;
yyy1 = sqrt(t23.^2-(xxx-(x1+x3)/2).^2);
yyy2 = -sqrt(t23.^2-(xxx-(x1+x3)/2).^2);
plot(xxx,yyy1,xxx,yyy2);
hold on;
xxxx = x1:0.001:x1;
yyyy1 = sqrt(t12.^2-(xxxx-(x1+x1)/2).^2);
yyyy2 = -sqrt(t12.^2-(xxxx-(x1+x1)/2).^2);
plot(xxxx,yyyy1,xxxx,yyyy2);
xlabel('σα(Mpa)');
ylabel('τα(Mpa)');
axis image 展开
xx = x3:0.001:x1;
yy1 = sqrt(t13.^2-(xx-(x1+x3)/2).^2);
yy2 = -sqrt(t13.^2-(xx-(x1+x3)/2).^2);
axes(handles.axes1);
plot(xx,yy1,xx,yy2);
hold on;
xxx = x3:0.001:x1;
yyy1 = sqrt(t23.^2-(xxx-(x1+x3)/2).^2);
yyy2 = -sqrt(t23.^2-(xxx-(x1+x3)/2).^2);
plot(xxx,yyy1,xxx,yyy2);
hold on;
xxxx = x1:0.001:x1;
yyyy1 = sqrt(t12.^2-(xxxx-(x1+x1)/2).^2);
yyyy2 = -sqrt(t12.^2-(xxxx-(x1+x1)/2).^2);
plot(xxxx,yyyy1,xxxx,yyyy2);
xlabel('σα(Mpa)');
ylabel('τα(Mpa)');
axis image 展开
1个回答
展开全部
这样修改试试
xx = x3:0.001:x1;
yy1 = sqrt(t13.^2-(xx-(x1+x3)/2).^2);
yy2 = -sqrt(t13.^2-(xx-(x1+x3)/2).^2);
% axes(handles.axes1);
plot(xx,yy1,xx,yy2);
xxx = x3:0.001:x1;
yyy1 = sqrt(t23.^2-(xxx-(x1+x3)/2).^2);
yyy2 = -sqrt(t23.^2-(xxx-(x1+x3)/2).^2);
% hold on;
xxxx = x1:0.001:x1;
yyyy1 = sqrt(t12.^2-(xxxx-(x1+x1)/2).^2);
yyyy2 = -sqrt(t12.^2-(xxxx-(x1+x1)/2).^2);
hold on;
plot(xxx,yyy1,xxx,yyy2);
plot(xxxx,yyyy1,xxxx,yyyy2);
xlabel('σα(Mpa)');
ylabel('τα(Mpa)');
axis image
xx = x3:0.001:x1;
yy1 = sqrt(t13.^2-(xx-(x1+x3)/2).^2);
yy2 = -sqrt(t13.^2-(xx-(x1+x3)/2).^2);
% axes(handles.axes1);
plot(xx,yy1,xx,yy2);
xxx = x3:0.001:x1;
yyy1 = sqrt(t23.^2-(xxx-(x1+x3)/2).^2);
yyy2 = -sqrt(t23.^2-(xxx-(x1+x3)/2).^2);
% hold on;
xxxx = x1:0.001:x1;
yyyy1 = sqrt(t12.^2-(xxxx-(x1+x1)/2).^2);
yyyy2 = -sqrt(t12.^2-(xxxx-(x1+x1)/2).^2);
hold on;
plot(xxx,yyy1,xxx,yyy2);
plot(xxxx,yyyy1,xxxx,yyyy2);
xlabel('σα(Mpa)');
ylabel('τα(Mpa)');
axis image
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询