Creating multiple plots with for loop
2 次查看(过去 30 天)
显示 更早的评论
I wish to create a program that comb through a file with data and create several plots. I have a prototype below but it does not give me all of the plots I need. Thank you.
T = V22050100Emat;
A = table2array(T);
x = A(1:52, 4);
y = A(1:52, 5);
plot(x,y,'ro')
title('Data points')
figure;
ph = plot(0,0,'ro');
%ax = gca;
%set(ax,'XLim');
%set(ax,'YLim');
for i = 1:10
set(ph,'XData',A(52+50*i:102+50*i, 4));
set(ph,'YData',A(52+50*i:102+50*i, 5));
drawnow;
end
0 个评论
采纳的回答
Yatharth
2022-7-6
Hey, if you want to plot and Display Multiple Axes in a Figure you can do so by
tiledlayout(10,1)
for i = 1:10
x= A(52+50*i:102+50*i, 4);
y1 = A(52+50*i:102+50*i, 5);
nexttile
plot(x,y1)
end
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!