作业帮 > 综合 > 作业

matlab中用hold on 命令如何保留上一次的图像

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/18 01:27:13
matlab中用hold on 命令如何保留上一次的图像
fplot('4*[cos(x-pi/4)]^2',[-3 0]);hold on; fplot('x/5+4',[0 5]);hold on;fplot('x*exp(5-x)',[5 13]) 这几个怎么把图像做到一个图里啊
matlab中用hold on 命令如何保留上一次的图像
function Y1=myfun1(x)
Y1=4*[cos(x-pi/4)]^2;
function Y2=myfun2(x)
Y2=x/5+4;
function Y3=myfun3(x)
Y3=x*exp(5-x)
[X,Y]=fplot(@myfun,[-3,0]);
plot(X,Y,'r')
hold on
[X,Y]=fplot(@myfun2,[0,5]);
plot(X,Y,'g')
hold on
[X,Y]=fplot(@myfun3,[5,13]);
plot(X,Y)
hold on
有点麻烦,你可以借鉴一下