run the script without opening the figure, its possible?
Afficher commentaires plus anciens
Is it possible to run the entire script without opening the images, in order to run faster.
Is there such a function?
5 commentaires
Walter Roberson
le 2 Mar 2021
That depends on what the script does.
Rik
le 2 Mar 2021
In other words: not without modifying the script.
If you're opening figures and you don't want the figures to appear, use
openfig(___,'invisible')
If you're creating new figures that should be invisible,
figure(__,'Visible','off')
and yes, both are faster than their alternatives.
yair gaedj
le 2 Mar 2021
Modifié(e) : yair gaedj
le 2 Mar 2021
Rik
le 2 Mar 2021
There is: you could shadow or edit the figure class or function. You should not attempt it. It is much more work to do that (and re-install Matlab several times because you severly broke things), than it is to change your script.
Let this be a lesson: use functions, and don't combine data processing and graphic creation in the same function.
Réponses (2)
Walter Roberson
le 2 Mar 2021
set(0, 'DefaultFigureVisible', 'off')
before you run the code.
This will last for the rest of your MATLAB session unless you reset it.
1 commentaire
Rik
le 2 Mar 2021
Good catch, I didn't think of that.
Jan
le 2 Mar 2021
0 votes
There is no chance to guess, what your code does, if we cannot see it. Maybe there is no reason to display the images, maybe this is required for the processing.
You did not mention, what "images" exactly are, so how could we guess, if there is a one line code or single function that "turns off" all the images?
I guess, that you can comment out the corresponding line of code.
1 commentaire
yair gaedj
le 2 Mar 2021
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects 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!