DSPRelated.com
Forums

Overiding builtin functions

Started by symbolix40 February 10, 2004
Hi there,

I've been using the Neural Network Toolbox recently, and decided to
integrate Matlab NN processing into a Excel Visual Basic macro.

Now this works fine, until I want to use a function named "sim" It
seems there is a builtin "sim" function that is used instead of the
one in the NN toolbox. However, when I'm working interactively with
Matlab, it automatically uses the NN toolbox "sim".

Both interactively and in the macro, "which sim" returns "builtin
function" which confuses me even more. I've tried adding the NN
toolbox directory to the start of the matlab path when working with
the macro, but haven't had any luck.

Basically what I'd like to know is: Is there anyway of overriding a
builtin function, or changing the function precedence rules that
matlab uses?

Alternatively, is there a way to run a specific function?

Any help would be much appreciated!

Thanks,
Joel



Just take the function you want and copy it to a private directory or into
your workspace. The function search order for Matlab is (1) Workspace (2)
Private Functions (3) Builtins. Try renaming as well... you get a similar
problem to this a lot when using the Matlab compiler
-----Original Message-----
From: symbolix40 [mailto:]
Sent: Tuesday, February 10, 2004 4:00 PM
To:
Subject: [matlab] Overiding builtin functions Hi there,

I've been using the Neural Network Toolbox recently, and decided to
integrate Matlab NN processing into a Excel Visual Basic macro.

Now this works fine, until I want to use a function named "sim" It
seems there is a builtin "sim" function that is used instead of the
one in the NN toolbox. However, when I'm working interactively with
Matlab, it automatically uses the NN toolbox "sim".

Both interactively and in the macro, "which sim" returns "builtin
function" which confuses me even more. I've tried adding the NN
toolbox directory to the start of the matlab path when working with
the macro, but haven't had any luck.

Basically what I'd like to know is: Is there anyway of overriding a
builtin function, or changing the function precedence rules that
matlab uses?

Alternatively, is there a way to run a specific function?

Any help would be much appreciated!

Thanks,
Joel _____________________________________
Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you
want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/matlab

More DSP-Related Groups: http://www.dsprelated.com/groups.php3
Yahoo! Groups Links