Can anyone tell me what mistake I am making here? Can you please suggest any changes which make this code work? Thank you.

 채택된 답변

Star Strider
Star Strider 2014년 10월 6일

0 개 추천

Objective functions for lsqcurvefit and nlinfit have to have the parameter argument as the first argument and the dependent variable as the second argument.
This should work:
fun = @(x,xdata) x(1).*sin((x(2).*xdata)+x(3)); %function handle for approx curve

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

질문:

2014년 10월 6일

편집:

2014년 10월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by