Description Usage Arguments Value Octave Documentation for evalin Examples
Evaluates an Octave expression in the current embedded Octave
session. The variables assigned in the expression are available for
subsequent o_eval
calls.
1 |
... |
The Octave expression(s) to evaluate, as a character string. |
CATCH |
The Octave expression(s) to evaluate if the evaluation(s) of
|
unlist |
a logical that specifies it single variables should be returned as a single value (default), or as a list. |
the result of the evaluation
[Generated from Octave-\Sexpr{RcppOctave::o_version()} on \Sexpr{Sys.time()}]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # assign some variable
o_eval("a=10")
# retrieve its value in a subsequent call
o_eval("a")
o_get('a')
# use its value
o_eval("b = a^2")
# multiple expression can be evaluated
o_eval(a="10^3", singular="svd(rand(4,4))", random="rand(10, 1)")
# or from a list
l <- list(a="10^3", singular="svd(rand(4,4))", random="rand(10, 1)")
o_eval(l)
# if the evaluation fails then an error is thrown
## Not run: o_eval("a=svd()")
# except if argument CATCH is provided
o_eval("a=svd()", CATCH="a=2")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.