필터 지우기
필터 지우기

polyfit at 74 how can I improve results?

조회 수: 3 (최근 30일)
RS
RS 2013년 8월 28일
Type of error coming how can I make good results warning(message('MATLAB:polyfit:RepeatedPoints'));
In polyfit at 74 Warning: Polynomial is badly conditioned. Add points with distinct X values or reduce the degree of the polynomial.
I am using this
[p S mu]= polyfit(x1(1:xxx),y2,3);

답변 (1개)

Image Analyst
Image Analyst 2013년 8월 28일
Do you have some x1 values that are repeated? What does this say
length(unique(x1(1:xxx)) - length(x1(1:xxx)) % No semicolon
  댓글 수: 3
Image Analyst
Image Analyst 2013년 8월 28일
편집: Image Analyst 2013년 8월 28일
Can't be 1, must be -1 because you can never have more unique values than original values. So, this is as I thought. One of the x values is repeated, meaning that you have two different y values for the same x value and thus the "curve" would have to be perfectly vertical at that location. That is not allowed. Do something to resolve that "step" in your data and it should then be okay.
RS
RS 2013년 8월 28일
every time I am doing fitting it is not coming -1 how can I do? some time it is coming some positive numbers.

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

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by