VPA behavior, workaround requested
Afficher commentaires plus anciens
Does anybody now a workaround for this behaviour of vpa?:
syms a b c
c=a+b; a=1; b=1;
vpa(c)
ans =
a + b
while
vpa(a+b)
returns the expected ans=2. I know I could define c after a and b, but in my particular program (the above is just a minimal example), this is not possible. So I am looking for a simple workaround (vpa(char(c)) also does not work).
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Conversion Between Symbolic and Numeric dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!