필터 지우기
필터 지우기

Fitting an Amplitude-Response Curve

조회 수: 3 (최근 30일)
Chinwe Orie
Chinwe Orie 2019년 2월 23일
댓글: Chinwe Orie 2019년 3월 6일
Hi,
I'm trying to fit an amplitude-frequency response curve to a particular equation (in picture below).
example.jpg
equation pic.png
I've tried using code to do it but I keep getting the following:
f1 = fittype( @(F, w0, g, m, w) F.*(cos(m.*(w0.^2-w.^2)./sqrt(m.^2*(w.^2-w0.^2).^2 + g.^2*w.^2)))....
./sqrt(m.^2*(w.^2-w0.^2).^2 + g.^2*w.^2), 'independent', {'w'},...
'dependent', {'y'} );
failedattempt.jpg
Also, I get a warning which says, "Warning: Start point not provided, choosing random start point." What does this mean?
Thanks!

채택된 답변

Rishabh Gupta
Rishabh Gupta 2019년 3월 4일
Hi Chinwe,
Generally Curve Fitting and Optimizations algorithms require you to give a starting point satisfying all your contraints(if any) from where the algorithms starts its logic and tries to find the best fit/best solution. In this case, you did not specify the starting point, hence the warning. But the algorithm needs a starting point, therefore it chooses a random starting point. Howecver this is not an error and may not affect your algorithm/results much. Please note in some case choice of starting point affects the solution.
I hope it was helpful.
Thanks
  댓글 수: 1
Chinwe Orie
Chinwe Orie 2019년 3월 6일
In this case, the starting point did matter! I adjusted it and works fine now. Thanks!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by