FUNCTION REFERENCE

evalc

Evaluate code and capture its console text.

Evaluate code and capture its console text.

Syntax

text = evalc(code); [text, value] = evalc(expression)

Example

strcmp(evalc('disp(5)'), sprintf('     5\n\n'))   % true

Differences from MATLAB: At most one expression result in addition to captured text.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.