how plot the best fit curve

조회 수: 1 (최근 30일)
Lilya
Lilya 2016년 12월 12일
댓글: Star Strider 2016년 12월 14일
Hi all,
the attached fig shows the daily mean time series data. how can plot the best fit curve? thank you.

채택된 답변

Star Strider
Star Strider 2016년 12월 12일
It depends on the result you want.
If you are fitting a model, you have to specify the model, and then do the linear or nonlinear regression. Plot the model with the estimated parameters with your data.
Another option is the Savitzky-Golay filter. This is essentially a low-pass filter that can smooth the noise in your signal.
Otherwise, I would do a Fourier transform, find the most prominent frequency (or frequencies, depending on the information you want from your data), then use the Signal Processing Toolbox designfilt function to create a filter to pass your frequencies-of-interest. Then, plot the filtered signal with your data.
Use the hold function to plot more than one set of data on the same axes.
  댓글 수: 10
Lilya
Lilya 2016년 12월 14일
very well done! You are the best, Thank you as you deserve for this ongoing help.
Star Strider
Star Strider 2016년 12월 14일
As always, my pleasure!
Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Smoothing and Denoising에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by