How to animate graph?
4 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
採用された回答
Jan
2018 年 3 月 22 日
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
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Animation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!