bisection method using matlab

2 views (last 30 days)
Firdaus Rosli
Firdaus Rosli on 20 Oct 2011
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 Comment
bym
bym on 21 Oct 2011
you usually have to show some attempt at using matlab, and ask a specific question to get a response

Sign in to comment.

Answers (1)

Niranjan Sundararajan
Niranjan Sundararajan on 7 Jun 2023
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
f_inv_val_of_t =
0.103244252227968
verification_output = f(f_inv_val_of_t) % = 1 m/s only
verification_output =
1.000000000000000
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

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!