Solving for c in v(t,g,m,c) given intial v,g,m,t

So I was given the initial equation
m(Dv/dt) = m*g-c*v ; v(0) = 0; [from textbook]
so I solved for v using
v = dsolve('Dv=(m*g-c*v)/m', 'v(0)=0')
and got
v =
(g*m - (g*m)/exp((c*t)/m))/c
now I am given
v = 28, g = 9.81, m =90, t =4
and I am supposed to find c
so I used
f =subs( v, {g,m,t}, {9.81,90,4)}
then solve(f-28, c)
however, I keep getting a lambertw function in my value for c or some expression including k,pi and i, so I think I must be doing something wrong.
Suggestions?

 Respuesta aceptada

Honglei Chen
Honglei Chen el 5 de Mzo. de 2012
Are you looking for a symbolic solution? If you want a numerical one, you can use fzero
v = 28, g = 9.81, m =90, t =4;
fzero(@(c) (g*m - (g*m)/exp((c*t)/m))/c-v, -1)

2 comentarios

Victor
Victor el 5 de Mzo. de 2012
I am looking for a numerical answer for c.
Victor
Victor el 5 de Mzo. de 2012
That worked!
Thank you very much :D

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 5 de Mzo. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by