Index exceeds the number of array elements (5).
Show older comments
The ecuation that i use to calculate my relative error tells me that exceeds the number of array elements.

Answers (1)
Katalin
on 26 May 2020
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.
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!