How to animate graph?
조회 수: 5 (최근 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!