Index exceeds the number of array elements (5).
조회 수: 1 (최근 30일)
이전 댓글 표시
The ecuation that i use to calculate my relative error tells me that exceeds the number of array elements.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/300908/image.png)
댓글 수: 0
답변 (1개)
Katalin
2020년 5월 26일
It is because:
ex = poly([-1 1 -2 2])
This is a vector of 5 elements and you are trying to access element 6-10 in your loop.
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!