bisection method using matlab
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
bym
am 21 Okt. 2011
you usually have to show some attempt at using matlab, and ask a specific question to get a response
Antworten (1)
Niranjan Sundararajan
am 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
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 Kommentare
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!