# Math Help - 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?
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 10, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8194946646690369, "perplexity": 510.96680788740605}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-30/segments/1469257830066.95/warc/CC-MAIN-20160723071030-00284-ip-10-185-27-174.ec2.internal.warc.gz"}