Hello,
I have one function that creates a symbolic expression for a variable, which is often lengthy. In another function, I am loading that symbolic expression and would like to evaluate that symbolic expression based upon parameters defined above.
For example, in my first function I solve for x to have the symbolic expression SymExpr = a*b*c. In my second function, I have a, b, and c defined as numeric values. I then load the saved symbolic expression SymExpr. I tried saying x = SymExpr, but this makes x a symbolic variable and x = char(SymExpr) but this makes x a string. I want x to be a double and I want to obtain the numeric value.
I know I could do this by just copying and pasting in the second function x = a*b*c, but my expressions from the first function can get very lengthy, so I'm trying to do this without having to copy/paste.
Thank you,
Kevin
Best Answer