Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
hgload with 100 figures in Matlab

Subject: hgload with 100 figures in Matlab

From: Jose

Date: 29 Apr, 2009 13:11:01

Message: 1 of 2

Hello Everyone,
someone can help me to write down in matlab a script to display
100 figures *.fig when I run it.

I know that using the command:
hgload 1.fig
hgload2.fig
.
.
.
hgload100.fig

Can be one option, but I am very lazy to do it with 100 figures,
someone can help me to do it more efficiently with a loop or another form.

Thanks in advance,

Jose.

Subject: hgload with 100 figures in Matlab

From: Jose

Date: 29 Apr, 2009 14:36:01

Message: 2 of 2

"Jose " <jose.l.vega@gmail.com> wrote in message <gt9jl5$ep2$1@fred.mathworks.com>...
> Hello Everyone,
> someone can help me to write down in matlab a script to display
> 100 figures *.fig when I run it.
>
> I know that using the command:
> hgload 1.fig
> hgload2.fig
> .
> .
> .
> hgload100.fig
>
> Can be one option, but I am very lazy to do it with 100 figures,
> someone can help me to do it more efficiently with a loop or another form.
>
> Thanks in advance,
>
> Jose.

ok, is done, I found it in Matlab central:


The clue is put all the figures of the current directory in the right order, then:
s=dir('*.fig')
for i=1:length(s)
    hgload(s(i).name)
end

cheers,

Jose.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us