Effacer les filtres
Effacer les filtres

Index exceeds the number of array elements (210)

1 vue (au cours des 30 derniers jours)
Mizo Amreya
Mizo Amreya le 13 Août 2020
Modifié(e) : Cris LaPierre le 13 Août 2020
Hi Matlab Community,
When I run my code I get an error "Index exceeds the number of array elements (210)".
I usually know what that means but what does the (210) mean?
Here's the exact line where the error occurs:
E(i)=-A(i)-B(i)-C(i)-D(i)-F(i)-G(i)-H(i)-I(i)-(phi*ct(i,t)*dy*dx*dz/dt);
Thanks in advance...

Réponse acceptée

Cris LaPierre
Cris LaPierre le 13 Août 2020
Modifié(e) : Cris LaPierre le 13 Août 2020
The (210) indicates the variable you have tried to index contains 210 elements.
Check your values of i and t, and the number of elements (numel) in A, B, C, D, E, F, G, H, I, and ct.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by