Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: How to customize location of startup.m?

$
0
0
On Wednesday, May 29, 2013 7:46:53 AM UTC+12, kj wrote:
> In <knqq10$h9j$1@speranza.aioe.org> dpb <none@non.net> writes:
>
>
>
> >On 5/24/2013 3:22 PM, kj wrote:
>
> >> What's the recommended way to customize the location of the file
>
> >> startup.m?
>
> >>
>
> >> (I imagine that the answer to this question will differ depending
>
> >> on the OS. If so, I'm interested in "all of them", i.e., Unix(-like)
>
> >> and Windows.)
>
>
>
> >Not sure what "customization" you're after or what the objective is.
>
>
>
> >I'd suggest starting with
>
>
>
> >doc startup
>
>
>
> I have not found the documentation helpful on this point (that's
>
> why I'm asking here in the first place). In fact, the documentation
>
> appears to me circular. For example, here
>
>
>
> http://www.mathworks.com/help/matlab/matlab_env/changing-the-startup-folder.html
>
>
>
> it says "Use the startup.m file to specify the startup folder..."
>
> but elsewhere it says that startup.m is to be found in the so-called
>
> startup folder.

I agree the documentation is a bit vague.
Start Matlab and type:
pwd
This is the directory that Matlab defaults to.
In my case it was:
c:\users\MyName\Documents\MATLAB
That's where I put startup.m, but the first line in my startup.m is:
cd d:\Matlab
where I store my .m files.

Viewing all articles
Browse latest Browse all 19628