Path: news.mathworks.com!not-for-mail
From: "Sven" <sven.holcombe@gmail.deleteme.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Call self-made functions without m-File in current directory
Date: Mon, 12 Oct 2009 14:56:05 +0000 (UTC)
Organization: University of Michigan
Lines: 18
Message-ID: <havg25$k8b$1@fred.mathworks.com>
References: <havdcd$kri$1@fred.mathworks.com>
Reply-To: "Sven" <sven.holcombe@gmail.deleteme.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1255359365 20747 172.30.248.38 (12 Oct 2009 14:56:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 12 Oct 2009 14:56:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1326470
Xref: news.mathworks.com comp.soft-sys.matlab:576753


Hi Jonas,
Yes.

If you store your set of functions in a given directory, say "C:/myfunctions/", you can then do the following:
addpath('C:/myfunctions/')

This will add your functions so that they are always available. I have the same setup, and I put the addpath() call into my startup script, so that my functions are always available.

Thanks,
Sven.

"Jonas Baumann" <baumann.jonas@gmail.com> wrote in message <havdcd$kri$1@fred.mathworks.com>...
> Over time I accumulated a few very simple tough (for me) very useful) functions that I reuse often during all kinds of tasks.
> 
> Up to now I simply drag & drop the required m-File into my current directory.
> Is there a way to include my "collection" to call them directly without copying files or entering directory paths? Kind of including them into my own customized functions database.
> 
> Thanks for the advice