eval(str)
eval(str, catch_str)
[r1, ... rn] = eval(str)
[r1, ... rn] = eval(str, catch_str)
| Parameter | Description |
|---|---|
| str | a string: Nelson instruction to execute |
| catch_str | a string: Nelson instruction to execute if an error is detected. |
| Parameter | Description |
|---|---|
| [r1, ... rn] | results: output variables |
eval executes Nelson instructions given in a string.
Please use try catch end block instead than eval, if you need to capture an error message for higher performance.
eval('B=4')
C = eval('B=4')
D = eval(4)
eval('error(''blabla'')', 'l = lasterror(); disp([''lasterror message: '', l.message])')
| Version | Description |
|---|---|
| 1.0.0 | initial version |