Index in position 1 exceeds array bounds

Stuck.....Please, help me check my work.....
Here is my code and my error

1 个评论

You need to look at the size of grafq. It appears you are trying to index into it beyond its size.

请先登录,再进行评论。

回答(2 个)

Perhaps you want the entire column. In that case, just do
P_rec_total = grafq(:, 1); % Extract P_rec_total from column 1.
Jan
Jan 2021-3-25
The error message is clear: The data imported from the Excelfile have 25 rows only. Then you cannot obtain the rows 26:325

类别

在 帮助中心 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息

回答:

Jan
2021-3-25

Community Treasure Hunt

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

Start Hunting!

Translated by