How to use REGRESSION & INTERPOLATION ?

조회 수: 6 (최근 30일)
Fadi Ftouhi
Fadi Ftouhi 2021년 4월 9일
댓글: John D'Errico 2021년 4월 9일
Hey, Can anyone help with this task because i'm really stuck.
The results of a noisy measurement can be found in the attached file. The first column in the file stands for the x values, the second column for the y values. The dependency of y values from x are described by the following equation:
@(a,b,x)a*(sin(pi*x).^2+0.05*x.^3)+b*1./(x.^2+1)
Fit the equation to the measured points and determine the parameter 'a' and 'b'. Estimate the standard deviation of measurement noise.
how to write this code?
  댓글 수: 1
dpb
dpb 2021년 4월 9일
Which toolboxes are you allowed to use?

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

답변 (1개)

the cyclist
the cyclist 2021년 4월 9일
I don't think you need interpolation for this task.
Do you have the Statistics and Machine Learning Toolbox? You could fit a non-linear model using the fitnlm function. The residuals of that model are the measurement noise.
  댓글 수: 1
John D'Errico
John D'Errico 2021년 4월 9일
Most students don't seem to understand the difference between interpolation, and what is needed here, thus empirical model building, approximation, and nonlinear regression. But yes, this question has nothing to do with interpolation.
The curve fitting toolbox is another choice to provide easy model estimation. The problem is, if this is a student homework assignment as it certainly seems to be, it may be that none of those tools will be deemed acceptable.

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

카테고리

Help CenterFile Exchange에서 Support Vector Machine Regression에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by