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?

 채택된 답변

Honglei Chen
Honglei Chen 2012년 3월 5일

1 개 추천

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

Victor
Victor 2012년 3월 5일
I am looking for a numerical answer for c.
Victor
Victor 2012년 3월 5일
That worked!
Thank you very much :D

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by