필터 지우기
필터 지우기

Using bisection method to solve vibrations problem

조회 수: 3 (최근 30일)
jeff417
jeff417 2016년 9월 17일
For my numerical methods class, we use MATLAB to solve all problems. I already have the bisection method code:
if true
function [x] = bisection(fun,a,b,maxtol,maxitr)
if nargin<5, maxitr=50; end
if nargin<4, maxtol=0.001; end
x = a;
k = 0;
fprintf('\nIter#\ta\t\t\tf(a)\t\t\tf(b)\t\tf(x)\n');
while k < maxitr && (abs(fun(x))) >= maxtol
k = k+1;
x = (a+b)/2;
if(fun(a) * fun(x)) < 0
b = x;
else
a = x;
end
fprintf('\n%i\t\t%f\t%f\t%f\t%f\t%f\t%f\n', k, a, fun(a), fun(b), fun(x))
end
For my problem, I have the solution as:
x(t) = x0*(exp(-ct/2m))*cos(sqrt((k/m) - ((c/2*m)^2)*t))
where t at t=0, x = x0.
I also have:
frequency: w = sqrt(k/m - (c/2*m)^2)
period: T = 2*pi / sqrt((k/m)-(c/2*m)^2)
critically damped: k/m - (c/2*m)^2 = 0
overdamped: k/m - (c/2*m)^2 < 0
I've been given values for k, c, and m.
My goal is to use the bisection method to find the time instants when the displacement is 5% of the initial displacement. I need the first three solutions.
I have no idea how to solve this, or even begin.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Acoustics, Noise and Vibration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by