Quantcast
Channel: MATLAB Central Newsreader - Private Functions: Calling Issue
Viewing all articles
Browse latest Browse all 10

Re: Private Functions: Calling Issue

$
0
0
"Falofolio " <falofolio@tiscali.nl> wrote in message
<f9enre$9o$1@fred.mathworks.com>...
> Hi,
>
> I am trying to use my own home-made private functions with my scripts.
> However, MATLAB R2007a (for PPC-Mac) just do not want to see my private
> functions.
>
> I have created a folder called 'private' containing my functions within the
folder,
> where my scripts are located. However, the error message I always receive,
when
> putting a function in the 'private' folder is:
>
> ??? Undefined function or method 'myfunction' for input arguments of type
> 'char'.
>
> FYI: all folders that contain a folder 'private' are set in my path.
>
> I call these private functions the same way as I call non-private functions. Is
that
> correct? Or, do I need to use some special statement to call a private
function?


There are several reasons I can think of. Some
issues I can think of:

- Are you using them from a SCRIPT, or from a
function? This probably has an effect.

- Never put the private directory itself on the
search path, only the directory above it.

- Is your directory within the Matlab toolbox
directories? This is a big no-no.

HTH,
John

Viewing all articles
Browse latest Browse all 10

Trending Articles