How to create an array from multiple and identical arrays using double for loops

1 次查看(过去 30 天)
How to create an array from multiple and identical arrays using double for loops
these are the given arrays
2a. 10m Depth Array
1017 1216 2526 -5658 -5622 -1419 -124 -3590
2217 -1230 -2098 -3351 -5325 -3665 1065 1178
4218 -3006 4453 -3684 -1625 1508 -4404 2079
-2074 -1945 -2944 -3647 -783 -1302 -5452 -1834
1620 -2122 -747 -5120 3469 -2816 -451 -687
-1332 247 -483 3963 -1712 -5866 -1545 278
3234 -2607 -621 -439 -3869 -6047 -4702 3073
-2831 3922 -5367 -3566 -3713 -2212 -4991 374
3018 3108 2204 -3468 321 2021 2903 -5163
220 129 1706 -5837 216 -6401 3399 958
1558 -5608 -2218 3098 804 -6375 -2456 2206
-4228 -2167 1991 4339 4003 -585 -303 -6053
-1287 3594 -3685 3170 -6048 4262 -5425 -2617
-1622 -1073 1619 -493 -2768 -3116 1515 834
3870 2930 -4521 1532 1541 -2220 223 -5197
2b. 25m Depth Array
7543 -34149 18240 12371 14946 12210 27219 27162
-27341 26447 -2188 -22809 19812 -25675 -2490 -34582
-1678 9788 25753 -40219 9324 -5805 -14504 19224
-16618 4511 -7413 12486 20378 6102 -26959 20999
2365 -25209 23769 20286 -7573 27480 -14249 -29474
-18089 -15039 4730 17722 -13971 -4644 -16596 -31189
19478 9486 -32683 5813 -22646 4616 -24880 11685
-3365 14225 25764 -11692 -21340 -10930 3527 -8883
-25385 16481 -13552 -39710 2165 -24134 7779 -2610
26435 9558 -17220 -12199 -11669 -3545 -21656 14693
-30126 -13634 -37293 -29585 8745 -11677 -25361 232
-6761 21953 24014 3997 -2322 -37843 5979 -42097
-289 -22587 2875 22601 -12573 12469 -13058 14753
11680 10705 -16585 -24179 642 -26303 9783 30385
1488 31137 -11107 -2337 17103 1057 -13577 2564
2c. 37.5m Depth Array
102169 -32463 36741 95791 18657 -37760 54804 7738
-46736 13999 33604 -46640 71413 50755 -49470 -32877
-15205 -12142 -18267 59194 -42531 43948 59145 81994
-54519 10861 -42526 92587 16140 -47159 32916 9534
85556 73959 40363 -22013 84732 70058 1281 64675
-72682 -31912 46722 -15507 39576 89945 -35029 32958
116945 65142 22240 -36520 -5978 19264 -52878 88694
28419 54363 115844 70922 -301 33465 48152 -31509
32366 -22165 -53538 17615 -17074 70489 91330 66024
-10581 103247 8560 -22817 26735 43025 56712 47449
-8139 -8040 -57162 -84870 26804 -21803 26483 33102
22815 -20704 48506 69408 91509 -65075 76010 -83707
52746 47724 70173 112382 34281 52349 82369 103319
-34759 24195 -7851 -29254 -33535 -65195 -5055 111055
101953 39025 22424 26345 98850 2057 42693 8183
2d. 81m Depth Array
235861 -404685 69955 -9757 21127 -141718 -196813 5761
-332407 211140 105770 -137478 211767 -374143 -122312 46717
-191474 143407 -339052 163650 -46327 -241501 -200901 220922
-382447 136444 52236 320916 240805 -214979 -21066 -195158
-399576 152749 -449051 37904 -387411 174024 53015 32610
-434813 -146874 -110929 -224393 -317677 75351 -279988 -65964
-135013 197291 170847 -127025 -326370 73334 -549795 38141
-121389 -338593 -308632 -152043 -495906 -252808 255124 25836
-411186 -47277 -154819 -220617 83704 -170649 -35676 180042
-353847 -267464 34284 81137 -33401 -27473 147091 33379
72870 -490823 -105122 -249322 -197063 -495761 -134666 -401965
-389741 -486850 -296852 -225339 -59074 -130061 -90277 -394675
-75505 -264912 -143853 -60961 -197694 -81530 -98284 189295
-294212 -462992 -252494 -374190 -509637 -483943 -411415 -370549
270596 264236 -168861 -187053 92570 -39318 -103819 -345736
2e. 210m Depth Array
-2195841 -2383960 -3612171 -3648656 -2063274 -1022977 -3668290 -3256765
-1721954 -2553548 252090 -2032914 -366005 -3876661 -1017942 -684883
13212 809560 -2633057 372715 -3768375 -461475 315332 -2898586
-3368524 -706065 -2833696 -971990 -1196086 -140234 -3744844 -328167
-2505559 -3255806 -1424380 -1052634 -3106565 -3513955 818718 -2532383
-4272605 -2446853 -3769862 -2688711 -115209 -1708209 -1176474 -3777157
-3758236 -920432 -3371272 -1228097 -1819172 -293591 -1569690 615186
-1728226 -1821452 -1781766 -3621870 279688 -688153 384290 -1492348
-426873 -1657251 -1243889 -925423 -3220073 -3083448 -2675430 1089319
-1397860 -545333 -173346 -1696550 252034 98909 -2475231 -1920146
-2350791 369630 -1282297 -2511869 746036 -2964001 -3049574 -3273612
-3066359 -3903672 -478266 -997313 -2636479 665856 -2578713 -1886079
-537948 -2787210 353133 -3206253 395206 -3213867 490088 601404
-3964706 -811713 -3859154 41019 -1209291 -3550519 239745 -423253
-1359393 71050 -1260432 -1415754 -1752051 -1012376 -3980332 -2932123
this is the array I want to output
Maximum Array
Maximum Array
235860.90 1216.40 69955.10 95791.40 21126.70 12210.20 54804.50 27161.90
2216.60 211139.80 252090.40 0.00 211767.40 50755.10 1064.60 46716.60
13212.10 809559.70 25753.50 372714.80 9323.80 43947.90 315331.60 220922.30
0.00 136444.30 52235.90 320916.30 240805.20 6101.80 32916.10 20998.80
85556.30 152749.50 40363.40 37904.10 84731.70 174023.90 818717.90 64674.60
0.00 247.30 46722.00 17722.00 39576.50 89945.30 0.00 32958.00
116945.10 197291.10 170847.40 5813.00 0.00 73334.50 0.00 615186.40
28418.90 54363.30 115843.90 70922.40 279688.30 33464.80 384289.60 25836.40
32366.10 16480.90 2204.10 17615.00 83704.50 70488.60 91330.00 1089319.50
26435.10 103247.10 34283.80 81136.70 252034.20 98909.00 147090.60 47449.50
72870.30 369630.30 0.00 3098.50 746036.30 0.00 26483.00 33102.10
22815.50 21953.50 48506.50 69407.60 91508.90 665855.80 76010.00 0.00
52746.30 47724.50 353133.10 112382.30 395206.10 52349.50 490088.10 601404.10
11680.50 24194.90 1618.80 41019.40 641.90 0.00 239745.30 111054.80
270596.30 264236.00 22424.10 26345.30 98850.20 2056.90 42693.20 8183.10
  7 个评论
Stephen23
Stephen23 2022-5-5
"these are the given files"
No, that is some text that you wrote on this thread.
Please upload the original data file/s by clicking the paperclip button.

请先登录,再进行评论。

回答(1 个)

KSSV
KSSV 2022-5-5
This can be achieved with function max. Read max
  1 个评论
manikanth Jonnadula
how to do it with double for loops
that should look a little bit like this
Min_RD_Data2 = RD_Data(1,1);
for i = 1:ROWn
for j = 1:COLn
Min_RD_Data2 < RD_Data(i,j);
Min_RD_Data2 = RD_Data(i,j);
end
end

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by