Random fitting when use fittype function in Toolboxes

조회 수: 5 (최근 30일)
Fan Li
Fan Li 2020년 10월 5일
댓글: Fan Li 2020년 10월 5일
Hi Matlab users
I am working on the data fitting by fittype function in Toolboxes. Basically, I have a set of data, x and y. I want to fit it with a function I defined. After I went through the document of fittype, I managed to get it work. However, I found that the fitting process is out of my control. I run the same code without changing anything, and the output of the fitted curve is quite different. The fitted results are listed below.Also, I got a warning from matlab "Start point not provided, choosing random start point." Not too sure they are related or not. My question is how to control the fitting process so that I can get the best fit like the first plot?
First run
Second run
Third run
Any help would be appriciated.

채택된 답변

Cris LaPierre
Cris LaPierre 2020년 10월 5일
They are absolutely related. It is the randomly selected start point that is leading to you getting different results each time. See this post.

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by