Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

evaluate symbolic expression... can't figure out!!

1 visualización (últimos 30 días)
Michael Vaughan
Michael Vaughan el 25 de Sept. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
so I have declared syms v t
then I have defind this very long expression rw11 to be:
rw11=
-(t^(2 - 2*k)*v^(k - 2)*(t - v)*(v - 1)*(t + t^2*v^2 + t^4*v^2 + t^k*v - t*v + t^(k + 1)*v + t^(k + 2)*v + t^(k + 3)*v + t^(k + 4)*v + t^(k + 5)*v - t^(k + 2) - t^(k + 3) - t^(k + 4) - t^2*v - t^3*v - t^4*v - t^(3*k + 2)*v - t^(3*k + 3)*v + t^(3*k)*v^2 - t^(k + 1)*v^2 - t^(k + 2)*v^2 - t^(k + 3)*v^2 + t^3 + t^(3*k + 5)))/((t - 1)^4*(t + 1)^2*(t^4 + t^3 + 2*t^2 + t + 1))
I want to know what rw11 is if instead of v i have t^(1/2)
How do I do this?? Thanks

Respuestas (1)

Samiu Haque
Samiu Haque el 25 de Sept. de 2020
Use this substitute function.
rw_new = subs(rw11,v,(t^(1/2)))
  1 comentario
Walter Roberson
Walter Roberson el 25 de Sept. de 2020
Though I would suggest
rw_new = subs(rw11, v, sqrt(t))
just to avoid having the formula parsed with the 1/2 being evaluated in floating point and then the symbolic toolbox having to figure out that the 0.5 is intended to approximate the rational value 1/2 .

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by