MATLAB study notes the tenth chapter--Curve fitting

Source: Internet
Author: User

1. Call Polyfit to have matlab calculate the coefficients of the polynomial that fits the data.

y = mx + b, which requires m and B values, we can use a Matlab function called Polyfit (x, y, N), where n is the number of times we want Matlab to find the polynomial, for y = mx + b equation, we set n equal to 1, So the statement that is called will be Polyfit (x, Y, 1).

2. You can use the Find command to ask questions about your data.

3. Fitting of exponential function

W = log10y

z = x
The data is then fitted in the following form: w = p1z + p2. The coefficients P1 and P2 are generated by calling Polyfit. This fit can be produced in MATLAB using the following command:
p = polyfit (x, log10 (y), 1), we can find m and b:m = P1, B = 10p2

MATLAB study notes the tenth chapter--Curve fitting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.