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

1 visualizzazione (ultimi 30 giorni)
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);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Risposta accettata

Torsten
Torsten il 7 Set 2025
Modificato: Torsten il 7 Set 2025
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.

Più risposte (0)

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by