Matlab - string evaluation function

Some Matlab functions handle the representation of string functions like f='a^x^b+sin(c*x)+d'--ie Fixing curves, optimizing, etc.

Assume that the specified variables a, b, c, dand x. Is there any function to evaluate ffrom its string representation?

0
source share
1 answer

You can do eval(f), but use is evalreally discouraged https://uk.mathworks.com/help/matlab/matlab_prog/string-evaluation.html

+1
source

Source: https://habr.com/ru/post/1685543/


All Articles