index exceeds array bound

49 次查看(过去 30 天)
AMRUTHA
AMRUTHA 2024-12-2
Please help to rectify the error . It shows index exceed array bound.

回答(1 个)

SACHIN KHANDELWAL
SACHIN KHANDELWAL 2024-12-6
The "index exceeds array bounds" error in Simulink typically occurs when you attempt to access an element of an array or matrix using an index that is outside the valid range.
x = [1:10]
x = 1×10
1 2 3 4 5 6 7 8 9 10
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
x(11)
Index exceeds the number of array elements. Index must not exceed 10.
I suggest analyzing the model to check if you are accessing an element that is out of range. When I simulate the model, it does not produce any errors for me. If you still face issue, please share the reproduction steps for further analysis.

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by