Simplify a symbolic expression

2 vues (au cours des 30 derniers jours)
Gerard Nagle
Gerard Nagle le 6 Avr 2021
Commenté : Gerard Nagle le 6 Avr 2021
Hi there
I'm was working thought a old document that has a MuPAD content in it.
when I try to do tha same in MATLAB with symbolic,
syms s
T=21.0325
L=3.5890
X=(0.6*T)*((s+(1/L))^2)/s
expand(X)
I get (25239*s)/2000 + 12619500/(12880921*s) + (25239/3589)
The numbers are correct, but is there a way to simplify further to correcpsond to the old MuPAD output?
trying simplify(X) I get (25239*(s + (1000/3589))^2)/(2000*s)
thanks in advance
Gerard

Réponse acceptée

Stephan
Stephan le 6 Avr 2021
syms s
T=21.0325
L=3.5890
X=(0.6*T)*((s+(1/L))^2)/s
vpa(expand(X),10)
  1 commentaire
Gerard Nagle
Gerard Nagle le 6 Avr 2021
Thanks Stephan, appreciate your time and reply. Gerard

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by