Matlab - Close the window with numbers

I write out the code in the Matlab editor, which contains about 30 digits. So, when I publish it, it opens 30 digits, which is annoying. How to make it open windows, but keeping the numbers in the published window?

I tried with close(figure) , but then the numbers do not appear in the published window.

Thank you in advance

+4
source share
6 answers

The easiest way to do this is close all when you are done with numbers. I'm not sure if this could be part of the script, or if you need to run it manually after posting.

+13
source

At least the plot command has the ability to control the visibility of the shape. So you should write something like

 h = plot(... , 'Visible', 'off'); 

I expect that they exist for other graphical objects as well, I know that this is done for the figures associated with anova .

Change The above hides the plot, but not the drawing itself. To hide a shape immediately after creating it, do

 set(gcf, 'Visible', 'off') 
+4
source

Perhaps you want to hold , which will display all the graphs in one window?

0
source

You can use subplot (m, n, p) to plot multiple plots in one window.

0
source

to state the decision

The first step is to build using a handler. Use figa = figure; where figa is now the shape handler. If you use several, for example 30, you said numbers, then figa = figure; figb = figure ....... figad = figure; second step; use numbers for what you want to build; this should be done by recalling a figure, for example a figure (figa), hold, graph (x1, y1) figure (figb), hold, graph (x2, y2) .... so on 30 graphs the third set - save all numbers saveas (figa, '1.fig'); saveas (figb, '2.fig'); ....... so on for 30 sites; The fourth step is to close the charts from your monitor to close everything; The fifth step is to reopen these numbers openfig ('1.fig'); openfig ('2.fig'); ............. so on for 30 figs

One suggestion: use excel to create this long list of shape names and it is better to use separate .m files so as not to increase your main matlab code.

0
source

The close function in Matlab does what you want. Read the documentation for more details.

To close all charts at the same time, you can use

 close all 

To close a specific digit named "fig5" (for example), you can use

 fig5 = scatter(x, y); close(fig5) 

If you use only "close", only the recent digit is closed.

0
source

All Articles