eval (Matlab function)
Execute a string containing an instruction/expression
Particular cases
- Expression:
When eval has to execute an expression then Scilab equivalent for eval is evstr
- Instruction:
When eval has to execute an instruction with just one output value then Scilab equivalent for eval is evstr. If instruction has more than one output value then execstr has to be used as follows.
When eval is used with two inputs then an equivalent can be found in examples below.
Examples
Matlab | Scilab |
eval('1+1') eval('x=1+1') eval('[d1,d2]=size(1)') [d1,d2]=eval('size(1)') eval('1+1','1+2') |
Report an issue | ||
<< etime (Matlab function) | E | exist (Matlab function) >> |