Matlab:在不同的数字上绘制两个轴

时间:2014-07-19 22:45:19

标签: matlab plot matlab-figure figure

我有两个数字

f1 = figure('visible','off');
f2 = figure('visible','off');

现在我想获得一些数据[x1Array,y1Array]& [x2Array,y2Array]并绘制图f1上的第一组和图f2上的第二组。

我尝试过使用:

plot(f1,x1Array,y1Array);
plot(f2,x2Array,y2Array);

但是这给了我一个错误:使用==> 错误plot String参数是一个未知选项。 我认为这意味着句柄不是Matlab所期望的。我做错了什么?

1 个答案:

答案 0 :(得分:2)

怎么样?
set(0, 'CurrentFigure', f1)
plot(x1Array, y1Array)
set(0, 'CurrentFigure', f2)
plot(x2Array, y2Array)
相关问题