问题描述:

A friend asked me to help him with an exercise in matlab, but I have 0 knowledge of matlab programming.

His question is:

**Numerical approximation of functions by least squares: linear regression + parabolic regression + polynomial regression with any degree polynomial**

I hope the translation makes sense.

He has to write a matlab code to answer to that question. Having no knowledge of matlab, can anyone show me how this is done and maybe some explanation alongside the code?

Thank you

I would start with the built-in Curve Fitting tool in the Apps tab of the GUI. Here's a description from Matlab: http://www.mathworks.com/help/curvefit/interactive-curve-and-surface-fitting-.html

Basically, it involves loading up the data you want to fit (e.g. as row vectors x and y) and assigning them to the curve fitting tool.

There are of course a wealth of non-GUI regression models. For example, linear regression: http://www.mathworks.com/help/matlab/data_analysis/linear-regression.html

您可能感兴趣的文章：

- r - ggplot2, Annotate y axis to indicate direction of scale used
- javascript - Taking key data from objects in Array and turning them into a , separated string
- jquery - Converting Spring MVC Views from Server-Side JSP to HTML: My AJAX calls aren't working
- dictionary - How can I get the second or first term in a map c++?
- How to format numbers as lakhs and crores in excel/ google spreadsheet when the number could be negative too?
- php - Reading a specific line from a text file
- clr - Any implementation of an Unrolled Linked List in C#?
- Finding Hudson Log Files
- Forward to a payment-gateway together with POST data using cURL (or any other PHP server side solution)
- WCF in Winforms app - is it always single-threaded?

随机阅读：

**推荐内容**-

**热点内容**-
- php - Reading a specific line from a text file
- clr - Any implementation of an Unrolled Linked List in C#?
- Finding Hudson Log Files
- Forward to a payment-gateway together with POST data using cURL (or any other PHP server side solution)
- WCF in Winforms app - is it always single-threaded?
- git svn - git svn fetch does not fetch a Subversion commit message modified after initial clone
- java me - Why I am getting the bad length exception when I am running this application?
- java - How to get string.format to complain at compile time
- ruby on rails - Trigger observer of parent class on change
- python - Issue with URL pattern in Django with webmonkey tutorial