# Using quadratic interpolation in matlab how ?

• MATLAB

## Main Question or Discussion Point

http://img337.imageshack.us/img337/8922/problemcmi0.jpg [Broken]

Can anyone explain to me please how this problem is solved ?

Last edited by a moderator:

Related MATLAB, Maple, Mathematica, LaTeX News on Phys.org
Integral
Staff Emeritus
Gold Member

Set v(t) = 35, then use the quadratic formula. OR

set t = each of the possible answers, which is closest to 35?

Well this is basically what i have done But im not sure why im getting to positive values for t ?
I would like to :
Set v(t) = 35, then use the quadratic formula.
Please feel free to tell me if the quadratic equation i used is wrong:-

a=8.66; b=-349.67;c=3523.18;
discr=qrt(b^2-4*a*c)
qf1=(-b+discr)/(2*a);
qf2=(-b-discr)/(2*a);
qf=[qf1 qf2]

I got qf=

21.0571 19.3025

Is the function in matlab defined as:
Ax^2 +bx + c

or

Ax^2 -bx +c

Last edited:

Found it finally :

http://img507.imageshack.us/img507/2144/partcns7.jpg [Broken]

This line basically i dont understand:-

p(3)=p(3)-35

Why minus ? I ued trial and error so i dont really know how i got it. May anyone explain please ?

Last edited by a moderator:
In addition to what i posted:

Ok now i can see i figured out the answer But what does not makes sense to me is that the velocity 35m/s is obtained twice between 18 & 22 seconds , 22 & 24 seconds. ! So theoretically i should be having 2 answers. Is there a Physical meaning of why im having one answer ?