Esta página aún no se ha traducido para esta versión. Puede ver la versión más reciente de esta página en inglés.

Utilidades de programación

Evaluar expresiones o funciones de forma indirecta, ofuscar código, establecer temporizadores, gestionar excepciones

MATLAB® incluye funciones para evaluar expresiones de forma indirecta, proteger el código fuente mediante técnicas de ofuscación, establecer temporizadores para la ejecución de programas y capturar datos sobre errores.

Funciones

expandir todo

evalEvaluate MATLAB expression
evalcEvaluate MATLAB expression and capture results
evalinEvaluate MATLAB expression in specified workspace
fevalEvaluate function
runRun MATLAB script
builtinExecute built-in function from overloaded method
pcodeCreate content-obscured, executable files
timerCreate object to schedule execution of MATLAB commands
deleteRemove timer object from memory
getQuery property values for timer object
isvalidDetermine timer object validity
setSet property values for timer object
startStart timer object
startatSchedule timer to fire at specified time
stopStop timer object
timerfindFind timer object
timerfindallFind timer object, regardless of visibility
waitBlock command prompt until timer stops running
try, catchExecute statements and catch resulting errors
MExceptionCapture error information
addCauseRecord additional causes of exception
addCorrectionProvide suggested fix for exception
getReportGet error message for exception
MException.lastReturn last uncaught exception
rethrowRethrow previously caught exception
throwThrow exception
throwAsCallerThrow exception as if occurs within calling function
matlab.lang.correction.AppendArgumentsCorrectionCorrect error by appending missing input arguments
matlab.lang.correction.ConvertToFunctionNotationCorrectionCorrect error by converting to function notation
matlab.lang.correction.ReplaceIdentifierCorrectionCorrect error by replacing identifier in function call

Temas

Protect Your Source Code

When you share your MATLAB code, the contents are easily accessed, revealing design and implementation details. You can obfuscate or compile your source files.

Schedule Command Execution Using Timer

To schedule the execution of MATLAB commands, create a timer object.

Exception Handling in a MATLAB Application

It is a good programming practice to include error checking in your programs to ensure reliable operation under all conditions. You can decide how your programs respond to different types of errors.

Create Hyperlinks that Run Functions

Functions that support the matlab: keyword can display hyperlinks, which execute commands when you click the hyperlink text.

Alternativas a la función eval

Aunque la función eval es muy eficaz y flexible, no siempre es la mejor solución para un problema de programación. En muchos casos, se recomiendan enfoques alternativos al uso de eval.