View License

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

» Watch video

Highlights from
externalfcn

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

1.0
1.0 | 1 rating Rate this file 1 Download (last 30 days) File Size: 1.34 KB File ID: #4361 Version: 1.0

externalfcn

by

Brett Shoelson (view profile)

 

13 Jan 2004 (Updated )

Enables calls to functions outside of the current path.

| Watch this File

File Information
Description

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.

Acknowledgements

This file inspired Execin.

MATLAB release MATLAB 6.5 (R13)
Other requirements Tested under MATLAB 6.5 (R13) and MATLAB 6.1 (R12.1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
03 Jun 2013 Thierry Dalon

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{:})

Contact us