Post Reply 
How to do this on my Prime ?
09-29-2017, 04:53 PM (This post was last modified: 09-29-2017 04:58 PM by toshk.)
Post: #7
RE: How to do this on my Prime ?
(09-29-2017 12:32 PM)Dieter Wrote:  
(09-29-2017 11:56 AM)ggauny@live.fr Wrote:  I am learn how to calculate a fonction of parabole with 3 points given.
Me I do at hand pincil and paper, after I have resolve I obtain a system of 3 equations what I resolve with app linear solver. But I have to calculation by hand
the system as I say.

I am sure there is a more elegant way on the Prime, but all you need is the linear equation solver. For a parabola the equation system is as follows:

Code:
   | x1² x1  1 |   →     | y1 |
   | x2² x2  1 | * p =   | y2 |
   | x3² x3  1 |         | y3 |

So simply start the linear solver and fill the matrix.
Consider the example in your screenshot:

Enter the x-values into the center column and the y-values on the right-hand side:

Code:
   | _  1  _ |   →     | 2 |
   | _ -2  _ | * p =   | 1 |
   | _  3  _ |         | 4 |

Fill the left column with the squares of the center column:

Code:
   | 1  1  _ |   →     | 2 |
   | 4 -2  _ | * p =   | 1 |
   | 9  3  _ |         | 4 |

Fill the right column with 1s:

Code:
   | 1  1  1 |   →     | 2 |
   | 4 -2  1 | * p =   | 1 |
   | 9  3  1 |         | 4 |

Now solve this system and you're done.

Dieter
[[2],[1],[4]]/vandermonde([1,-2,3])
for ill/weird/large/spare matrix: try
LSQ(vandermonde([1,-2,3]),[[2],[1],[4]])
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to do this on my Prime ? - Dieter - 09-29-2017, 12:32 PM
RE: How to do this on my Prime ? - toshk - 09-29-2017 04:53 PM



User(s) browsing this thread: 1 Guest(s)