Hi. I've tried doing some camull-rom interpolation for the following data.(adsbygoogle = window.adsbygoogle || []).push({});

x y

0.2 1.221402861

0.3 1.349864712

0.4 1.491929555

0.5 1.649697833

0.6 1.828165418

0.7 2.042000232

0.8 2.332915111

0.9 2.808281551

1 3.718281828

1.1 5.597908484

1.2 9.511853345

1.3 17.45514585

1.4 32.98066546

1.5 62.14672813

1.6 114.9041952

1.7 207.0733374

1.8 363.0963701

1.9 619.7925202

2 1031.389056

I chose to interpolate for point 1.1 (i'm assuming this point is non-existent).

I am using the following method:

f(x) = [1, x, x^2, x^3] * M * [p0, p1, p2, p3]

And M is the matrix,

0.0 1.0 0.0 1.0

-0.5 0.0 0.5 0.0

1.0 -2.5 2.0 -0.5

-0.5 1.5 -1.5 0.5

The "tension" value (greek letter tau) is 0.5.

Thus, the 4 points chosen were 0.9, 1, (2 before 1.1), 1.2, 1.3 (the 2 after 1.1).

I did it in matlab and got wrong values (using an input of 1.1 and expecting to get a value close to 5.5979). I have since learnt that the input needs to be between 0 and 1. How do I scale this value of 1.1 to be between 0 and 1 ? And does anything else change , in the M matrix, matrix of points [p0, p1, p2, p3] ?

Thankyou.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Catmull Rom splines, scaling the input.

Can you offer guidance or do you also need help?

**Physics Forums | Science Articles, Homework Help, Discussion**