Creating multiple plots with for loop
2 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
Yatharth
on 6 Jul 2022
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 Comments
More Answers (0)
See Also
Categories
Find more on Graphics Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!