Getting a constant instead of (2*exp(-3/2))/3 + 1/3 solving a differential equation

2 Ansichten (letzte 30 Tage)
I want to get a constant number instead of (2*exp(-3/2))/3 + 1/3 solving a differential equation.
I have used dsolve() to find the solution;
Then,I have used sub() to substitute the parameter with a constant to get a number.
But I dont get any number.
Can anyone help with this?
  1 Kommentar
John D'Errico
John D'Errico am 30 Mai 2020
That is a constant number. Just not in floating point form. If that is what you want, then use Star's suggestion. Either double or vpa will do it.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Star Strider
Star Strider am 30 Mai 2020
Use the vpa or double function, depending on the result you want.

Sohan Mahmud
Sohan Mahmud am 30 Mai 2020
Use sym2poly() after using subs().

Kategorien

Mehr zu Physics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by