# Thread: I suck at MATLAB!

1. ## I suck at MATLAB!

I understand the mathematics behind this and could easily do this by hand, but I'm complete noob when it comes to Matlab.

I need to write a Matlab-function interpol.m that will return the interpolation polynomial $p_{n}(x)$ in Newton form for $x_{0},x_{1},x_{2},\ldots,x_{n}$ and $f(x_{0}),f(x_{1}),f(x_{2}),\ldots,f(x_{n})$

Then I have to write a program interpol_plot.m to plot f(x) and $p_{n}(x)$ for n=3, n=5, and n=10, and then test this on $f(x)=\frac{1}{2+3x^{2}}$.

2. You'll appreciate MATLAB in a few years.

3. Originally Posted by realpart1/2
I understand the mathematics behind this and could easily do this by hand, but I'm complete noob when it comes to Matlab.

I need to write a Matlab-function interpol.m that will return the interpolation polynomial $p_{n}(x)$ in Newton form for $x_{0},x_{1},x_{2},\ldots,x_{n}$ and $f(x_{0}),f(x_{1}),f(x_{2}),\ldots,f(x_{n})$

Then I have to write a program interpol_plot.m to plot f(x) and $p_{n}(x)$ for n=3, n=5, and n=10, and then test this on $f(x)=\frac{1}{2+3x^{2}}$.
Some help on this would be greatly appreciated.

4. Originally Posted by realpart1/2
Some help on this would be greatly appreciated.
Maybe you should ask a question first. If you understand the mathematics behind this, you have trouble with the programming syntax, pherhaps? Is there something special you need help with or do you expect a finished m-file?