Display the same image in two figures
1 次查看(过去 30 天)
显示 更早的评论
I have a problem with gui the image displayed in the first Figure but the same image is not displayed in the figure after it
1 个评论
jahanzaib ahmad
2019-2-14
x=rand(10,2);
figure(1)
plot(x(:,1),x(:,2))
figure(2)
plot(x(:,1),x(:,2))
what the problem ?
回答(1 个)
Mark Sherstan
2019-2-15
You must have a figure or some variables saved which is affecting your output. Add the two lines at the start of your code to see if the problem persists. The following code gave me results shown below.
clear all
close all
x=rand(10,2);
figure(1)
plot(x(:,1),x(:,2)); title('Figure 1');
figure(2)
plot(x(:,1),x(:,2)); title('Figure 2');
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Visual Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!