Is there any way to get numerical result from symbolic function?
Mostrar comentarios más antiguos
Hi,
I have a smybolic function created by syms command and at the next steps in my code, i should get numerical output by using this function. To do this operation, i copy the symbolic function from workspace and paste my editor. This is too long method and easy to make mistake. So, i have to use symbolic function directly.
What kind of methods can i use for this operation? Do you have any example about this?
Thx!
Respuesta aceptada
Más respuestas (2)
KSSV
el 30 de Oct. de 2020
1 voto
You can substitute a variable value in the syms using subs and then use double, vpasolve to convert into numerica array.
Read about subs, double.
Walter Roberson
el 30 de Oct. de 2020
1 voto
Use matlabFunction to convert the expression into a numeric function.
Categorías
Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!