| Contents | Index |
result = feval(symengine,F,x1,...,xn)
[result,status] = feval(symengine,F,x1,...,xn)
result = feval(symengine,F,x1,...,xn) evaluates F, which is either a MuPAD function name or a symbolic object, with arguments x1,...,xn, with result a symbolic object.
[result,status] = feval(symengine,F,x1,...,xn) returns the error status in status, and the error message in result if status is nonzero. If status is 0, result is a symbolic object. Otherwise, result is a string.
syms a b c x p = a*x^2+b*x+c; feval(symengine,'polylib::discrim', p, x)
ans = b^2 - 4*a*c
Alternatively, the same calculation based on variables not defined in the MATLAB workspace is:
feval(symengine,'polylib::discrim', 'a*x^2 + b*x + c', 'x')
ans = b^2 - 4*a*c
Do not use feval to access the MuPAD log function that represents the logarithm to an arbitrary base. The feval command evaluates log as the natural logarithm (the appropriate MuPAD function is ln):
feval(symengine,'log', 'E')
ans = 1
Evaluating log with two parameters results in the following error:
feval(symengine,'log', '10', '10')
Error using mupadengine.mupadengine>mupadengine.feval MuPAD error: Error: expecting one argument [ln]
doc | evalin | read | symengine

See how symbolic computations can help you find analytical solutions to math and engineering problems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |