Keep a figure full screen while looping
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am currently working on a simple script where i have a figure with a solid color for an image, but it is a loop. every time it loops the image loses its color (like as its red, the more that time goes by the darker it gets until it is completely black.). However I want to keep the image in a full screen perspective. I found possible functions but for looping it doesn't work as it simply causes the image from it being maximized to its normal size, then back to maximized. I don't want it to continue doing that at all. is there a solution around this?
2 commentaires
Rik
le 24 Juil 2019
You are probably using imshow, which is a really high level function. You are probably better off using the image function or directly setting the CData property.
Without knowing some of your code it is difficult to tell.
Réponses (1)
Rik
le 24 Juil 2019
Store the output of imshow in a variable (it is a handle to the image object).
Then inside the loop only change the CData property with the set function. The calls to figure and imshow may both cause issues and are slowing your code needlessly.
Also, your first line of code is largely unnecessary. You're not outputting anything to the command window, so clc is not needed. Close all is not really needed either, because you're opening a specific numbered figure (use clf if you want to clear the contents of a figure). And clear should only be used during debugging (use functions to keep your workspace clean).
0 commentaires
Voir également
Catégories
En savoir plus sur Display Image dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!