Index exceeds the number of array elements (1).

94 Ansichten (letzte 30 Tage)
Ioannis Vourvachakis
Ioannis Vourvachakis am 14 Okt. 2021
Kommentiert: Pitchai am 22 Aug. 2025
I ran a file, but an error appears in the follownig line:
Refset=sol(iii(1:first_members),:);
with the message: Index exceeds the number of array elements (1).
What does it mean? Thank you.
  3 Kommentare
Ioannis Vourvachakis
Ioannis Vourvachakis am 14 Okt. 2021
thank you very much
Pitchai
Pitchai am 22 Aug. 2025
I run the circuit inmatlab , the error will come this type please help me to clear the error "Index exceeds the number of array elements. Index must not exceed 17"

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Cris LaPierre
Cris LaPierre am 14 Okt. 2021
The error means you are trying to index a vector/array element that does not exist in your variable. Specifically, your error message is telling you your array has a single element, and your index is >1.
% Works
A = 27;
A(1)
ans = 27
% doesn't work
A(2)
Index exceeds the number of array elements. Index must not exceed 1.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by