I'm encountering the following error when I run my main program.

1 回表示 (過去 30 日間)
maha
maha 2025 年 9 月 7 日
編集済み: Torsten 2025 年 9 月 7 日
Index in position 2 exceeds array bounds. Index must not exceed 1440.
Error in topo_mask
data = topo(xmin:xmax, ymin:ymax);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Main_program
mask=topo_mask(main_path,area,rslt,mask_depth);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

採用された回答

Torsten
Torsten 2025 年 9 月 7 日
編集済み: Torsten 2025 年 9 月 7 日
Do you see the problem ?
a = rand(4,5)
a = 4×5
0.8078 0.4142 0.9365 0.4319 0.4061 0.4331 0.0943 0.7995 0.2306 0.9260 0.0461 0.7000 0.8302 0.2652 0.4430 0.9862 0.6140 0.5213 0.8581 0.2236
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
a(1:3,4:6)
Index in position 2 exceeds array bounds. Index must not exceed 5.
"ymax" is bigger than the second dimension of the array "topo", namely 1440.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by