matlab中axes怎样实现多个函数图像叠加

2024-12-27 20:02:17
推荐回答(1个)
回答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