How to put limit on coefficient produced by polyfit in MATLAB?
이전 댓글 표시
Hello,
So what I am trying to do is plot some experimental data along with a second order polynomial fit (Ax^2 + Bx + C), the coefficients of which are determined using polyfit. The problem I am having is that I do not want the first term, in this case A to be negative. Is there any way I can put constraints on this A term so that it does not go below zero?
Any help would be appreciated.
댓글 수: 1
ali asakereh
2022년 2월 20일
편집: ali asakereh
2022년 2월 20일
Hi Anna,
did you find the answer?
답변 (1개)
Wayne King
2013년 7월 31일
0 개 추천
There are routines on the file exchange like this one:
If you have the Optimization Toolbox, see
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!