Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

syms first then add numbers

1 visualizzazione (ultimi 30 giorni)
Philosophaie
Philosophaie il 17 Set 2013
Chiuso: MATLAB Answer Bot il 20 Ago 2021
This may sound silly but I would like to write an equation in "syms" variables to actually see the variables in the equation then after it is printed out add numbers to the equation to get the final results. Is this possible?

Risposte (1)

Walter Roberson
Walter Roberson il 17 Set 2013
syms x y z
eqn = x^3 + sin(y) - exp(z);
pretty(eqn)
val = subs(eqn, {x, y, z}, {7, pi/3, 1/2});
pretty(val)
double(val)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by