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:
path browser

Subject: path browser

From: Hans Van de Vijver

Date: 18 Apr, 2009 17:37:01

Message: 1 of 7

Matlab has different functions to load files etc....,
At the moment i am doing some reasearch for a PhD and i need to load a directory with a lot of images about 6000.

Until now i always loaded this directory like this

MapPath = 'E:\measuremnts\ref plane\Meting 1';

If this is used on a different computer you need to change the path manually what is very user friendly.
Is there a way to browse to the path like in an open window from windows; the problem is not loading a filename as variable but an entire path.
Already tried the functions
path
path('newpath')

userpath
userpath('newpath')

But i rlly want a popup open window from windows, I haven't tried a activeX control yet.

best regards

H

Subject: path browser

From: dpb

Date: 18 Apr, 2009 17:50:50

Message: 2 of 7

Hans Van de Vijver wrote:
...
> Is there a way to browse to the path like in an open window from windows; ...

doc uigetfile

--

Subject: path browser

From: Hans Van de Vijver

Date: 18 Apr, 2009 18:22:01

Message: 3 of 7

 
 doc uigetfile
 -> i know this command used it before it is to open a single file but i need the pathstring
like my mapname is "pictures"
I press my button select directory
the the UI opens for browsing
the i only select the map with 6000 pics in it.
so i get
x="pathstring"

Subject: path browser

From: dpb

Date: 18 Apr, 2009 18:30:31

Message: 4 of 7

Hans Van de Vijver wrote:
>
> doc uigetfile
> -> i know this command used it before it is to open a single file but
> i need the pathstring

Look at optional return value...

If that doesn't suit (I can't decipher _exactly_ what it is you are
asking for owing to language; obviously English isn't your primary so
that's not criticism, only explanation) at least my version of ML
doesn't have a builtin visual directory dialog.

I've not tried that in ML; I tend to not build extensive gui's using ML;
just not my way of using it so can't provide much additional guidance
there. I tend to use the OS commands instead which may not be what
you're wanting.

--

Subject: path browser

From: Jiro Doke

Date: 18 Apr, 2009 19:57:01

Message: 5 of 7

"Hans Van de Vijver" <hans.vandevijver@skynet.be> wrote in message <gsd5o9$l7r$1@fred.mathworks.com>...
>
> doc uigetfile
> -> i know this command used it before it is to open a single file but i need the pathstring
> like my mapname is "pictures"
> I press my button select directory
> the the UI opens for browsing
> the i only select the map with 6000 pics in it.
> so i get
> x="pathstring"

Is "uigetdir" what you are looking for?


jiro

Subject: path browser

From: Godman

Date: 19 Apr, 2009 01:55:07

Message: 6 of 7

On 4=D4=C219=C8=D5, =C9=CF=CE=E73=CA=B157=B7=D6, "Jiro Doke" <jiro.d...@mat=
hworks.com> wrote:
> "Hans Van de Vijver" <hans.vandevij...@skynet.be> wrote in message <gsd5o=
9$l7...@fred.mathworks.com>...
>
>
>
> > doc uigetfile
> > -> i know this command used it before it is to open a single file but =
i need the pathstring
> > like my mapname is "pictures"
> > I press my button select directory
> > the the UI opens for browsing
> > the i only select the map with 6000 pics in it.
> > so i get
> > x=3D"pathstring"
>
> Is "uigetdir" what you are looking for?
>
> jiro

This is what i need=A3=ACso thank you....

Subject: path browser

From: Hans Van de Vijver

Date: 19 Apr, 2009 09:25:03

Message: 7 of 7

Yes,

Thank you very much the uigetdir works.
It was so simple and i didn't even see it tnx all for your help

Regards

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