Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Error when calling interp1.

조회 수: 2 (최근 30일)
joshva raj
joshva raj 2012년 9월 10일
마감: MATLAB Answer Bot 2021년 8월 20일
When I call interp1, an error occurs stated ,'there should be atleast two data points'. This error occur only if the values used in the program are large enough.
  댓글 수: 1
Jan
Jan 2012년 9월 10일
I suggest to post the code. Otherwise we can only guess the cause of the problems.

답변 (1개)

Walter Roberson
Walter Roberson 2012년 9월 10일
Are you providing inputs that have 15 or more digits before the decimal place? If so then you are probably exceeding the precision that is supported with IEEE 754 double precision. By the time you get to 4.5035996273705e+15 then representable double precision numbers are spaced apart by at least 1.
The same difficulty can happen with smaller numbers that are spaced more closely together. 3E15 + 1/2 cannot be told apart from 3E15 + 1/4

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by