View License

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

» Watch video

Highlights from
evalf.m v2.0 (Sep, 2009)

5.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 4.64 KB File ID: #22054 Version: 1.1

evalf.m v2.0 (Sep, 2009)



10 Nov 2008 (Updated )

Evaluates any function (handle, anonymous, name, full-name) even if not in the MATLAB PATH!

| Watch this File

File Information

FEVAL does not work correctly with:
a) anonymous functions
b) function specifyed by its full-name
c) functions outside MATLAB's PATH.

This program resolves this problems and adds new functionalities:
d) run a function with a given directory as current, different to the current one (PWD).
e) run an script outside the PATH and getting any variable definition on MATLAB workspace (new, Sep 2009)

Just try:
>> evalf -C:\ ls
to get a list of files on Windows Root.

The file includes many others examples. I tried to make it work on almost all previous MATLAB releases.

Enjoy it!
Any comments or bug reports would be very appreciated!

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
08 Oct 2012 K E

K E (view profile)

Seems to no longer work in R2012b. Error from the str2func call.

Comment only
06 Jul 2012 K E

K E (view profile)

This is the only way I've found to run a function that is not on Matlab's path. The built-in function run.m does not work with functions, only scripts.

21 Sep 2009 1.1

v2.0 Fixed bug with reading name file and extension. Now works with scripts. Changed help, comments and variables names.

Contact us