|
|
set path to latest file, when starting
Hi
Is it able to automatically set the current folder and path to those of the latest closed m file, when starting matlab?
Mine is always in Desktop/Windows.
I use R2010a. Thanks.
Mike
|
|
0
|
|
|
|
Reply
|
Mike
|
10/13/2010 12:52:03 AM |
|
"Mike Liu" <sulfateion@gmail.com> wrote in message <i92vrj$qtp$1@fred.mathworks.com>...
> Hi
>
> Is it able to automatically set the current folder and path to those of the latest closed m file, when starting matlab?
> Mine is always in Desktop/Windows.
> I use R2010a. Thanks.
>
> Mike
Try this,
http://www.mathworks.com/help/techdoc/matlab_env/f8-4994.html
|
|
0
|
|
|
|
Reply
|
jrazzano (4)
|
10/13/2010 1:27:03 AM
|
|
"John " <jrazzano@usc.edu> wrote in message <i931t7$8j4$1@fred.mathworks.com>...
> "Mike Liu" <sulfateion@gmail.com> wrote in message <i92vrj$qtp$1@fred.mathworks.com>...
> > Hi
> >
> > Is it able to automatically set the current folder and path to those of the latest closed m file, when starting matlab?
> > Mine is always in Desktop/Windows.
> > I use R2010a. Thanks.
> >
> > Mike
>
> Try this,
>
> http://www.mathworks.com/help/techdoc/matlab_env/f8-4994.html
Specifically you will want to write something that when matlab closes (finish.m in your path) will write the current directory to your startup.m (in your startup path), so that your startup.m would contain something like
cd('C:\')
then when matlab starts it will run startup.m
|
|
0
|
|
|
|
Reply
|
jrazzano (4)
|
10/13/2010 1:35:03 AM
|
|
"John " <jrazzano@usc.edu> wrote in message <i931t7$8j4$1@fred.mathworks.com>...
> "Mike Liu" <sulfateion@gmail.com> wrote in message <i92vrj$qtp$1@fred.mathworks.com>...
> > Hi
> >
> > Is it able to automatically set the current folder and path to those of the latest closed m file, when starting matlab?
> > Mine is always in Desktop/Windows.
> > I use R2010a. Thanks.
> >
> > Mike
>
> Try this,
>
> http://www.mathworks.com/help/techdoc/matlab_env/f8-4994.html
Thanks a lot. It helps.
Mike
|
|
0
|
|
|
|
Reply
|
sulfateion (350)
|
10/14/2010 12:30:10 AM
|
|
|
3 Replies
232 Views
(page loaded in 0.041 seconds)
|
|
|
|
|
|
|
|
|