i want to plot 4 plots using ginput

1 回表示 (過去 30 日間)
Adam Joan
Adam Joan 2019 年 8 月 28 日
回答済み: Alex Mcaulley 2019 年 8 月 28 日
clear all;
close all;
for k=1:4
axis([0,10,0,10]);
data = ginput(4);
x = data(:,1);
y = data(:,2);
plot(x,y,'r','LineWidth',1);
axis([0,10,0,10]);
end
this code doesnot plot 4 graphs at the same time.it is getting removed after 1st iteration.please help me to draw 4 plots in a single graph uing ginput

採用された回答

Alex Mcaulley
Alex Mcaulley 2019 年 8 月 28 日
Adding hold on:
clear all;
close all;
hold on
for k=1:4
axis([0,10,0,10]);
data = ginput(4);
x = data(:,1);
y = data(:,2);
plot(x,y,'r','LineWidth',1);
axis([0,10,0,10]);
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by