How to animate graph?

5 Ansichten (letzte 30 Tage)
Mark Cuanan
Mark Cuanan am 22 Mär. 2018
Beantwortet: Jan am 22 Mär. 2018
Say I have a 3x3 matrix, I want to plot the 3 columns in animation. Meaning plotting the column values 1 after the other. Any idea please. Thanks for the help.

Akzeptierte Antwort

Jan
Jan am 22 Mär. 2018
M = rand(3, 3);
figure;
axes('XLim', [1, 3], 'YLim', [0, 1])
H = line(1:3, inf(1, 3));
for k = 1:3
set(H, 'YData', M(:, k));
pause(1);
end

Weitere Antworten (0)

Kategorien

Mehr zu Animation finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by