symbolic equation to numerical answer

2 vues (au cours des 30 derniers jours)
Jonathan Greenwood
Jonathan Greenwood le 4 Juil 2019
Commenté : Torsten le 4 Juil 2019
Hi,
I have created a symbolic equation on a previous script and saved it as a .mat file
I hvae then opened it in a new script and wish asign variables to gain a numerical value
can anyone help me with this?
solv = open('solvx.mat')
x=solv.solx;
cx = 10;
cy = 10;
r = 2;
b = 30;

Réponse acceptée

Bjorn Gustavsson
Bjorn Gustavsson le 4 Juil 2019
Take a look at matlabFunction, it should be the function to use to convert a symbolic expression to a numerical functin.
HTH
  1 commentaire
Torsten
Torsten le 4 Juil 2019
Or use
vpa(subs(...))

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by