You are on page 1of 4

Example: Polynomial Interpolation

Page 1 of 4

eLearning

Knowledge Base Your System Administrator has Installed: Search LearningConnector

2 recommended topics from 2 courses

PTC LearningConnector
Get Started
Setup

Mathcad Prime 2.0 - Application Orientation

Copy Expressions

Start using Mathcad Prime 2.0 with these free tutorials!

Example: Polynomial Interpolation
polyint U se t he polyint f unct i on t o perf orm pol ynom i ali nt erpol at i on on a dat a set . i ne a dat a set . 1. D ef

2. Cal lt he polyint f unct i on t o cal cul at et he pol ynom i ali nt erpol at i on of t he dat a set at a part i cul ar poi nt .

At x = 328, t he i nt erpol at ed resul ti s y = -0.189, w i t h an error of 0. 056. 3. D ef i ne t he range of x val ues w here you w ant t of i nd t he i nt erpol at ed y val ues.

4. Record t he i nt erpol at ed val ues and t hei r respect i ve error.

5. Pl ot t he dat a poi nt s, t he i nt erpol at ed curve, and t he error est i m at e.

http://127.0.0.1:63996/mprime_en/mprime/example_polynomial_interpolation.html?queryI...

3/5/2013

Fi nd t he pol ynom i alcoef f i ci ent sf or t he pol ynom i alcurve t hat passes t hrough t he set of dat a poi nt s def i ned above.0. 1. 3.1:63996/mprime_en/mprime/example_polynomial_interpolation. D ef i ne a pol ynom i alf unct i on. use polycoeff. 2.Example: Polynomial Interpolation Page 2 of 4 Copy Expressions polycoeff To cal cul at et he i nt erpol at ed val ues... To cal cul at e bot ht he i nt erpol at i ng pol ynom i al and som e of i t s deri vat i ves. D i f f erent i at et he pol ynom i alf unct i on. The coef f i ci ent s provi ded by polycoeff are l ess accurat e at gi ven dat a poi nt s. 3/5/2013 . so t hey are not t he best represent at i on of i nt erpol at ed val ues. w here c i st he vect or of pol ynom i alcoef f i ci ent s.html?queryI. use polyint. http://127.0.

1:63996/mprime_en/mprime/example_polynomial_interpolation. The resul t s of polyint and polycoeff shoul d not be used t o m ake predi ct i ons f or y val ues out si de of t he range of t he ori gi nalx val ues. It di d not achi eve an error of 0. polyiter U se t he polyiter f unct i on t o perf orm a pol ynom i ali nt erpol at i on. 1.. so i t di d not st op bef ore t he N_max i t erat i on. The al gori t hm di d not converge. 3/5/2013 .Example: Polynomial Interpolation Page 3 of 4 4. as i s done by t he polyfit f unct i on. and t he i t erat ed pol ynom i al . 01 and i t ret urned t he sam e resul t as polyint: 3. t he exact pol ynom i al . and i t sf i rst deri vat i ve.html?queryI. http://127. Copy Expressions The polycoeff f unct i on does not const ruct t he pol ynom i alof best l east -squares f i t .. Cal lt he polyiter f unct i on. Pl ot t he ori gi nalpoi nt s.0. Pl ot t he dat a poi nt s. t he pol ynom i ali nt erpol at i on. D ef i ne t he m axi m um possi bl e num ber of i t erat i ons and t he t ol erance. 2.0.

3/5/2013 .0..html?queryI.1:63996/mprime_en/mprime/example_polynomial_interpolation..0.Example: Polynomial Interpolation Page 4 of 4 Copy Expressions Related Links Li near Predi ct i on http://127.