Change Matlab search path in 'Matlab's engine" environment under Mac OS 10.6

2 views
Skip to first unread message

Fred

unread,
Jan 14, 2010, 1:09:24 PM1/14/10
to MATLAB Pool
Hi!
Im interfacing Matlab from a C Application.

Example:
Engine *ep = engOpen("\0");
engEvalString(ep, "path(path,'/some/path/to/m-file')");
engEvalString(ep, "SOME_FUNCTION_IN_A_M_FILE");

I cannot use the path function prior to call a '.m' outside of the
current search paths. Either sending 'cd' doesn't work.

Does anybody know how to call a custom '.m' outside the default search
paths?

Tom Gaudette

unread,
Jan 15, 2010, 8:22:06 AM1/15/10
to Fred, MATLAB Pool
RUN Run script.
Typically, you just type the name of a script at the prompt to
execute it. This works when the script is on your path. Use CD
or ADDPATH to make the script executable from the prompt.

RUN is a convenience function that runs scripts that are not
currently on the path.

RUN SCRIPTNAME runs the specified script. If SCRIPTNAME contains
the full pathname to the script, then RUN changes the current
directory to where the script lives, executes the script, and then
changes back to the original starting point. The script is run
within the caller's workspace.

See also cd, addpath.
Reply all
Reply to author
Forward
0 new messages