필터 지우기
필터 지우기

How do I constrain a vector's value within a nonlinear fit?

조회 수: 3 (최근 30일)
matlabkid602
matlabkid602 2017년 7월 20일
댓글: matlabkid602 2017년 7월 20일
I am fitting a set of data using nlinfit as magnetic dipoles and I want my fitted parameters to be only positive.
How do I make this constraint?

채택된 답변

Torsten
Torsten 2017년 7월 20일
Put them in the fittype equation as parameters-squared.
Best wishes
Torsten.
  댓글 수: 3
Torsten
Torsten 2017년 7월 20일
편집: Torsten 2017년 7월 20일
Yes, put the parameters squared in the fittype function and square the results after solving.
Best wishes
Torsten.
matlabkid602
matlabkid602 2017년 7월 20일
Thank you, it works.

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

추가 답변 (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