How automatic insert (once defined) symbolic expression from script or workspace to function?
1 view (last 30 days)
Show older comments
Hi. I have symbolic expressions in a script file (that represent calculated partial derivatives. Because I need, at each iteration, that get the numeric value of the symbolic expression depending on the new set values of variables, I created a function, that compute this) Since that symbolic expression is different from case to case, is there a possibility that the expression automatic import in function without manual typing these expressions. I want to define this expression in one place in the script file, and than when you call functions, this expression be automatically loaded in function. Thank you in advance.
0 Comments
Accepted Answer
Walter Roberson
on 15 Mar 2013
Perhaps you want to use matlabFunction() ?
5 Comments
Walter Roberson
on 15 Mar 2013
Be careful, matlatFunction idea of which order the variables should be in are not necessarily the same as yours. To avoid surprises I recommend using the 'vars' parameter if there are multiple variables.
More Answers (0)
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!