Keep a figure full screen while looping
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Rik
il 24 Lug 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.
Risposte (1)
Rik
il 24 Lug 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 Commenti
Vedere anche
Categorie
Scopri di più su Display Image in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!