MATLAB怎么做两个figure?我想做两个figure 一个是星形线,一个是四叶玫瑰线,这是我的代码theta=linspace(0,2*pi,400);rou=4*sin(2*theta);figure(1)hold onpolar(theta,rou);b=2;fh=@(x,y)x^(2/3)+y^(2/3)-b^(2/3)ezplot(fh)t=-2*pi:0.1:2
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/31 19:32:41
![MATLAB怎么做两个figure?我想做两个figure 一个是星形线,一个是四叶玫瑰线,这是我的代码theta=linspace(0,2*pi,400);rou=4*sin(2*theta);figure(1)hold onpolar(theta,rou);b=2;fh=@(x,y)x^(2/3)+y^(2/3)-b^(2/3)ezplot(fh)t=-2*pi:0.1:2](/uploads/image/z/6998087-47-7.jpg?t=MATLAB%E6%80%8E%E4%B9%88%E5%81%9A%E4%B8%A4%E4%B8%AAfigure%3F%E6%88%91%E6%83%B3%E5%81%9A%E4%B8%A4%E4%B8%AAfigure+%E4%B8%80%E4%B8%AA%E6%98%AF%E6%98%9F%E5%BD%A2%E7%BA%BF%2C%E4%B8%80%E4%B8%AA%E6%98%AF%E5%9B%9B%E5%8F%B6%E7%8E%AB%E7%91%B0%E7%BA%BF%2C%E8%BF%99%E6%98%AF%E6%88%91%E7%9A%84%E4%BB%A3%E7%A0%81theta%3Dlinspace%280%2C2%2Api%2C400%29%3Brou%3D4%2Asin%282%2Atheta%29%3Bfigure%281%29hold+onpolar%28theta%2Crou%29%3Bb%3D2%3Bfh%3D%40%28x%2Cy%29x%5E%282%2F3%29%2By%5E%282%2F3%29-b%5E%282%2F3%29ezplot%28fh%29t%3D-2%2Api%3A0.1%3A2)
MATLAB怎么做两个figure?我想做两个figure 一个是星形线,一个是四叶玫瑰线,这是我的代码theta=linspace(0,2*pi,400);rou=4*sin(2*theta);figure(1)hold onpolar(theta,rou);b=2;fh=@(x,y)x^(2/3)+y^(2/3)-b^(2/3)ezplot(fh)t=-2*pi:0.1:2
MATLAB怎么做两个figure?
我想做两个figure 一个是星形线,一个是四叶玫瑰线,这是我的代码
theta=linspace(0,2*pi,400);
rou=4*sin(2*theta);
figure(1)
hold on
polar(theta,rou);
b=2;
fh=@(x,y)x^(2/3)+y^(2/3)-b^(2/3)
ezplot(fh)
t=-2*pi:0.1:2*pi;
x=cos(t).^3;y=sin(t).^3;
figure(2);plot(x,y)
做出来以后四叶玫瑰线就跑到星形线的坐标轴里了
MATLAB怎么做两个figure?我想做两个figure 一个是星形线,一个是四叶玫瑰线,这是我的代码theta=linspace(0,2*pi,400);rou=4*sin(2*theta);figure(1)hold onpolar(theta,rou);b=2;fh=@(x,y)x^(2/3)+y^(2/3)-b^(2/3)ezplot(fh)t=-2*pi:0.1:2
你干嘛要画3副图呢,figure(1)里有2个图,当然会重叠了
要不就画3副,要不就去掉一副:
clear all;clc;
theta=linspace(0,2*pi,400);
rou=4*sin(2*theta);
figure(1);
polar(theta,rou);hold on;
t=-2*pi:0.1:2*pi;
x=cos(t).^3;
y=sin(t).^3;
figure(2);
plot(x,y);
b=2;
fh=@(x,y)x^(2/3)+y^(2/3)-b^(2/3);
figure(3)
ezplot(fh);