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

조회 수: 5 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by