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!

 Réponse acceptée

Adam Danz
Adam Danz le 9 Fév 2019
Modifié(e) : Adam Danz le 9 Fév 2019

1 vote

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

Plus de réponses (0)

Catégories

En savoir plus sur Debugging and Improving Code dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by