How I convert matrix 8760x1 to 365x24

1 visualización (últimos 30 días)
Vaios Giantsos
Vaios Giantsos el 20 de Mayo de 2022
Respondida: Voss el 20 de Mayo de 2022
How I convert matrix 8760x1 to 365x24

Respuesta aceptada

Voss
Voss el 20 de Mayo de 2022
M = 1:8760; % some 8760x1 matrix
M_new = reshape(M,365,[]) % reshape to 365x24
M_new = 365×24
1 366 731 1096 1461 1826 2191 2556 2921 3286 3651 4016 4381 4746 5111 5476 5841 6206 6571 6936 7301 7666 8031 8396 2 367 732 1097 1462 1827 2192 2557 2922 3287 3652 4017 4382 4747 5112 5477 5842 6207 6572 6937 7302 7667 8032 8397 3 368 733 1098 1463 1828 2193 2558 2923 3288 3653 4018 4383 4748 5113 5478 5843 6208 6573 6938 7303 7668 8033 8398 4 369 734 1099 1464 1829 2194 2559 2924 3289 3654 4019 4384 4749 5114 5479 5844 6209 6574 6939 7304 7669 8034 8399 5 370 735 1100 1465 1830 2195 2560 2925 3290 3655 4020 4385 4750 5115 5480 5845 6210 6575 6940 7305 7670 8035 8400 6 371 736 1101 1466 1831 2196 2561 2926 3291 3656 4021 4386 4751 5116 5481 5846 6211 6576 6941 7306 7671 8036 8401 7 372 737 1102 1467 1832 2197 2562 2927 3292 3657 4022 4387 4752 5117 5482 5847 6212 6577 6942 7307 7672 8037 8402 8 373 738 1103 1468 1833 2198 2563 2928 3293 3658 4023 4388 4753 5118 5483 5848 6213 6578 6943 7308 7673 8038 8403 9 374 739 1104 1469 1834 2199 2564 2929 3294 3659 4024 4389 4754 5119 5484 5849 6214 6579 6944 7309 7674 8039 8404 10 375 740 1105 1470 1835 2200 2565 2930 3295 3660 4025 4390 4755 5120 5485 5850 6215 6580 6945 7310 7675 8040 8405

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by