bisection method using matlab
1 回表示 (過去 30 日間)
古いコメントを表示
vertical velocity of a motorcycle due to a road bump is given by:
V(t)=X*exp(-zeta*Wn*t)*(-zeta*Wn*sin(Wd*t)+Wd*cos(Wd*t))
Where; X=maximum displacement of the motor cycle , 0.4550m zeta=damping constant , 0.4037 Wn=undamped natural frequency of the system , 3.4338rad/s Wd= Wn*sqrt(1-zeta^2)=damped natural frequency of the system t=time
Determine the time, t, at which the velocity of the motorcycle attains a value of 1m/s.
I know how to find it by using microsoft excel. However, I would like to try it in matlab. Can anyone help me?
Thx
1 件のコメント
bym
2011 年 10 月 21 日
you usually have to show some attempt at using matlab, and ask a specific question to get a response
回答 (1 件)
Niranjan Sundararajan
2023 年 6 月 7 日
Hey there,
What you essentially want to compute is the inverse of the function V(t). To do so in MATLAB, you can use the fzero function. Documentation link - https://in.mathworks.com/help/matlab/ref/fzero.html
Now, you want to find V(inverse) of 1 m/s. To do so, follow the following code snippet. P.S. - I have used the formula you provided for velocity.
format long;
V=1; %m/s
f_inv_val_of_t = fzero(@(t) f(t) - V, 0) %seconds
verification_output = f(f_inv_val_of_t) % = 1 m/s only
function V = f(t)
%time in seconds
X = 0.4550; %m
zeta = 0.4037;
Wn = 3.4338; %rad/s
Wd = Wn*sqrt(1-zeta^2); %rad/s
V=X*exp(-zeta*Wn*t)*(-zeta*Wn*sin(Wd*t)+Wd*cos(Wd*t)); %m/s
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!