polyval doesn't recognise input as numeric value
이전 댓글 표시
Hello to all,
I want to create a loop where a value x is calculated through interpolation. In the first run "x = polyval(p,y);" works fine. In the end of the first run I get:
x =
48845.957126841025088289460260046
In the second run where x has changed, even though x is a number, polyval gives me an error saying "Error using filter Invalid data type. Input arrays must be numeric or logical.". Putting the value manually doesn't give the error.
Has anyone faced this error before?
Best regards,
Paris Pasqualin
댓글 수: 2
KSSV
2020년 11월 1일
It will work for all the cases if the input is double. You need not to use a loop, you can input x as an array. Show us how was x which threw error.
Paris Pasqualin
2020년 11월 1일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!