Solving a quadratic Lagrange interpolant , How ?

AI Thread Summary
The discussion centers on solving a problem using MATLAB, specifically regarding the calculation of coefficients for a quadratic equation based on given velocity values at specific time intervals. The user attempts to derive coefficients a0, a1, and a2 from three equations based on velocity data at times 15, 18, and 22 seconds. They express the equations in matrix form and calculate the coefficients, but the results do not match the expected output for a specific time (16 seconds), leading to confusion about the correctness of their approach. The user is seeking assistance to identify the mistake in their calculations, particularly regarding the expected velocity at time 16 seconds and whether multiple answers should be considered for different intervals. The urgency of the situation is emphasized as the submission deadline approaches.
uaeXuae
Messages
54
Reaction score
0
http://img151.imageshack.us/img151/5562/updatequicklyte1.jpg



how would i solve it using MATLAB ? I tried many times but i didnt get the same answer may anyone help me please ?
 
Last edited by a moderator:
Technology news on Phys.org
Anyone please ? I have to submit this in 2 days please help...


My attempt is as follows

v(15)=a0+a1(t)+a2(t)=24
a0+a1(15)+a2(15)^2=24


v(18)=a0+a1(t)+a2(t)=37
a0+a1(18)+a2(18)^2=37

v(22)=a0+a1(t)+a2(t)=25
a0+a1(22)+a2(22)^2=25


I then wrote it in the Matrix Form

a=[1 15 225;1 18 324;1 22 484]
b=[24;27;35]
x=a/b

Results:

a0=-323.8571
a1=38.9048
a2=-1.0476


Using the following Equation:

v(16)=-323.8571+(38.9048*16)+(-1.0476*(16^2))=
30.4341 s which is wrong ofcourse The ans is 20.846 so wheres my mistake
 
The value 26m/s is obtained twice

First interval: 15 -18
Second Interval: 18-22

So i should be getting two answers is that so ?
 
Anyone please help me submission is tommrow
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
What percentage of programmers have learned to touch type? Have you? Do you think it's important, not just for programming, but for more-than-casual computer users generally? ChatGPT didn't have much on it ("Research indicates that less than 20% of people can touch type fluently, with many relying on the hunt-and-peck method for typing ."). 'Hunt-and-peck method' made me smile. It added, "For programmers, touch typing is a valuable skill that can enhance speed, accuracy, and focus. While...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top