Index in position 1 exceeds array bounds
Show older comments
Stuck.....Please, help me check my work.....
Here is my code and my error


1 Comment
David Hill
on 25 Mar 2021
You need to look at the size of grafq. It appears you are trying to index into it beyond its size.
Answers (2)
Image Analyst
on 25 Mar 2021
Perhaps you want the entire column. In that case, just do
P_rec_total = grafq(:, 1); % Extract P_rec_total from column 1.
Jan
on 25 Mar 2021
0 votes
The error message is clear: The data imported from the Excelfile have 25 rows only. Then you cannot obtain the rows 26:325
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!