Main Content

Programming Utilities

Evaluate expressions or functions indirectly, set timers, handle exceptions

MATLAB®includes functionality to indirectly evaluate expressions, set timers for program execution, and capture data on errors.

Functions

expand all

eval EvaluateMATLABexpression
evalc EvaluateMATLABexpression and capture results
evalin EvaluateMATLABexpression in specified workspace
feval Evaluate function
run RunMATLABscript
builtin Execute built-in function from overloaded method
timer Schedule execution ofMATLABcommands
delete Delete files or objects
get Query graphics object properties
isvalid Determine valid handles
set Set graphics object properties
start Start timer
startat Schedule timer to fire at specified time
stop Stop timer
timerfind Find timer objects
timerfindall Find all timer objects
wait Block command prompt until timer stops running
try, catch Execute statements and catch resulting errors
MException Capture error information
addCause Record additional causes of exception
addCorrection Provide suggested fix for exception
getReport Get error message for exception
MException.last 返回最后一个未捕获异常
rethrow Rethrow previously caught exception
throw Throw exception
throwAsCaller Throw exception as if occurs within calling function
matlab.lang.correction.AppendArgumentsCorrection Correct error by appending missing input arguments
matlab.lang.correction.ConvertToFunctionNotationCorrection Correct error by converting to function notation
matlab.lang.correction.ReplaceIdentifierCorrection Correct error by replacing identifier in function call
parfevalOnAll Run function on all workers in background
parallel.pool.Constant Copy or create data only once on workers in parallel pool
canUseGPU Verify supported GPU is available for computation
canUseParallelPool Verify that parallel functions can use a parallel pool

Topics