File Exchange

image thumbnail

externalfcn

version 1.0 (1.34 KB) by

Enables calls to functions outside of the current path.

0 Downloads

Updated

View License

Parses string arguments to enable calls to functions outside of the current workspace. (Function externalfcn must, of course, be defined in the current path.)

EX:
externalfcn('[x,y] = c:\testdirectory\testfcn(a,b)')

...will call testfcn.m even if 'c:\testdirectory\' is not currently defined on the path.

Comments and Ratings (1)

Isn't it a bit complicated for simply something like:
function [varargout]=funeval(fun,varargin)
% INPUT:
% fun: (char) full path to function file
curdir=cd;
[fundir,funname]=fileparts(fun);
cd(fundir);
[varargout{1:nargout}] =feval(funname,varargin{:})

MATLAB Release
MATLAB 6.5 (R13)
Acknowledgements

Inspired: EXECIN

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video