matlab关于hold on 的画图clear all;t=0:pi/20:2*pi;x=sin(t);y=cos(t);figureplot(t,x,':r');hould on plot(t,y,'*b');legend('sin(t)','cos(t)');请问大侠怎么只能画出一条曲线?
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/18 19:04:17
![matlab关于hold on 的画图clear all;t=0:pi/20:2*pi;x=sin(t);y=cos(t);figureplot(t,x,':r');hould on plot(t,y,'*b');legend('sin(t)','cos(t)');请问大侠怎么只能画出一条曲线?](/uploads/image/z/4208851-19-1.jpg?t=matlab%E5%85%B3%E4%BA%8Ehold+on+%E7%9A%84%E7%94%BB%E5%9B%BEclear+all%3Bt%3D0%3Api%2F20%3A2%2Api%3Bx%3Dsin%28t%29%3By%3Dcos%28t%29%3Bfigureplot%28t%2Cx%2C%27%3Ar%27%29%3Bhould+on+plot%28t%2Cy%2C%27%2Ab%27%29%3Blegend%28%27sin%28t%29%27%2C%27cos%28t%29%27%29%3B%E8%AF%B7%E9%97%AE%E5%A4%A7%E4%BE%A0%E6%80%8E%E4%B9%88%E5%8F%AA%E8%83%BD%E7%94%BB%E5%87%BA%E4%B8%80%E6%9D%A1%E6%9B%B2%E7%BA%BF%3F)
matlab关于hold on 的画图clear all;t=0:pi/20:2*pi;x=sin(t);y=cos(t);figureplot(t,x,':r');hould on plot(t,y,'*b');legend('sin(t)','cos(t)');请问大侠怎么只能画出一条曲线?
matlab关于hold on 的画图
clear all;
t=0:pi/20:2*pi;
x=sin(t);
y=cos(t);
figure
plot(t,x,':r');
hould on
plot(t,y,'*b');
legend('sin(t)','cos(t)');
请问大侠怎么只能画出一条曲线?
matlab关于hold on 的画图clear all;t=0:pi/20:2*pi;x=sin(t);y=cos(t);figureplot(t,x,':r');hould on plot(t,y,'*b');legend('sin(t)','cos(t)');请问大侠怎么只能画出一条曲线?
这样画不出曲线
倒数第三行,hould on
打错了
应该是hold on 才对
这样才能画出一条曲线