Borrar filtros
Borrar filtros

Index exceeds the number of array elements (5).

1 visualización (últimos 30 días)
Michel Lopes Villaluz
Michel Lopes Villaluz el 25 de Mayo de 2020
Comentada: darova el 26 de Mayo de 2020
The ecuation that i use to calculate my relative error tells me that exceeds the number of array elements.

Respuestas (1)

Katalin
Katalin el 26 de Mayo de 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.

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by