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

采纳的回答

Yatharth
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
You can refer to the documentation for various configuration

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by