run the script without opening the figure, its possible?

Is it possible to run the entire script without opening the images, in order to run faster.
Is there such a function?

5 件のコメント

Walter Roberson
Walter Roberson 2021 年 3 月 2 日
That depends on what the script does.
Rik
Rik 2021 年 3 月 2 日
In other words: not without modifying the script.
Adam Danz
Adam Danz 2021 年 3 月 2 日
編集済み: Adam Danz 2021 年 3 月 2 日
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
yair gaedj 2021 年 3 月 2 日
編集済み: yair gaedj 2021 年 3 月 2 日
tnx.
But if I understand correctly, each image should be done separately ...
I mean there is no one line code or single function that "turns off" all the images
Rik
Rik 2021 年 3 月 2 日
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.

サインインしてコメントする。

回答 (2 件)

Walter Roberson
Walter Roberson 2021 年 3 月 2 日

3 投票

set(0, 'DefaultFigureVisible', 'off')
before you run the code.
This will last for the rest of your MATLAB session unless you reset it.

1 件のコメント

Rik
Rik 2021 年 3 月 2 日
Good catch, I didn't think of that.

サインインしてコメントする。

Jan
Jan 2021 年 3 月 2 日

0 投票

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 件のコメント

yair gaedj
yair gaedj 2021 年 3 月 2 日
in my code I have a lot of figures. so.. when the code running, all of the figures are jumping to my screen. i would like to know if there is a one line code or any function that canceling the the display of the figures (just untill i will finish to write the code) and when i will remove this line, the algorithm will reset and the figures will shows up. the figures is a plots of graphs. thanks for helping‏‏

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

質問済み:

2021 年 3 月 2 日

コメント済み:

Rik
2021 年 3 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by