MATLAB discrete data points fit the curve and draw the relevant confidence interval (default 95%)

foreword

Recently, the small project I took on involved curve fitting of discrete data points and drawing of confidence intervals after fitting. While learning from books and technical posts from excellent bloggers, I have studied and explored, and found that there are few reference materials for small details such as the use of nonlinear regression functions and the drawing of confidence intervals. Here is a summary for the convenience of subsequent review and use.

Summarize

Curve fitting on discrete data points:

  • Linear regression (polynomial curve fitting)
  • Nonlinear regression (custom function fitting)

The relevant content is shown in the following mind map:
insert image description here
there are some places that have been described by many excellent bloggers, for example:

[1], Matlab draws the fitting curve with confidence interval
[2], error analysis calculation formula and its matlab code implementation (mse, mape, rmse, etc.)
[3], matlab curve fitting function usage and example (polyfit)
[ 4], the error parameter description of Matlab's fitting toolbox
[5], what is the prediction interval and confidence interval

Here, I wrote a small summary for linear regression polynomial fitting + prediction interval, confidence interval drawing and nonlinear fitting (custom function) fitting + confidence interval drawing. as follows:

[1], MATLAB linear regression polynomial fitting + prediction interval, confidence interval drawing
[2], Matlab uses nlinfit function for multiple nonlinear regression, and draws the error interval of curve fitting

Welcome to leave a message and exchange! ! !


At the same time, if you have a need for drawing, you can search for the user on Xianyu: Man Xiaojie, welcome to communicate.


Guess you like

Origin blog.csdn.net/ONERYJHHH/article/details/114417845