Index exceeds the number of array elements (40)

5 次查看(过去 30 天)
Aiman Faruq
Aiman Faruq2021-10-21
回答: Cris LaPierre ,2021-10-22
ii= 1
[data,time] = gl2000_csvread(fname{ii});

回答(1 个)

Cris LaPierre
Cris LaPierre 2021-10-22
Missing a lot of details here, but the error is easy enough to interpret. You are trying to access an element that does not exist in your array. Specificaly your array has 40 elements, and you have tried to index it with a number greater than 40.
A = 1:5;
% Works
ans = 3
% Doesn't work
Index exceeds the number of array elements. Index must not exceed 5.


Community Treasure Hunt

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

Start Hunting!

Translated by