Documentation

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

evalc

Evaluate MATLAB expression with capture

Syntax

T = evalc(expression)
[T,output1,...,outputN] = evalc(expression)

Description

T = evalc(expression) is the same as eval(expression) except that anything that would normally be written to the command window, except for error messages, is captured and returned in the character array T (lines in T are separated by \n characters).

[T,output1,...,outputN] = evalc(expression) is the same as [output1,...,outputN] = eval(expression) except that any output is captured into T.

Input Arguments

expression

String that contains a valid MATLAB® expression.

To include a numeric value in the expression, convert it to a string with int2str, num2str, or sprintf.

Output Arguments

T

Output normally written to the command window during the evaluation of expression, except for error messages, returned in a character array. The lines in T are separated by \n characters.

output1,...,outputN

Outputs from the evaluated expression.

More About

collapse all

Tips

When you are using evalc, functions diary, more, and input are disabled.

See Also

| | | | | |

Introduced before R2006a

Was this topic helpful?