I've a matrix of 0's and 1's. It is changing with time. I'm using imshow to visualize the matrix. However, I want to see how the data changes with time. Now I can see only the final state. If I run it 1000 times, I want to all of that happening one after the other.
Thanks!

 Accepted Answer

Adam Danz
Adam Danz on 9 Feb 2019
Edited: Adam Danz on 9 Feb 2019
The solution depends on how the matrix is being updated but here's a general framework to updating a time varying matrix using imshow().
while ~done
% <--- update matrix here
imshow()
drawnow
pause(0.2) %seconds
if isdone %determine if you're on the last frame (replace 'isdone')
done = true
end
end

More Answers (0)

Categories

Find more on Debugging and Improving Code in Help Center and File Exchange

Asked:

on 9 Feb 2019

Edited:

on 9 Feb 2019

Community Treasure Hunt

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

Start Hunting!