How do I convert this into a 2d matrix of 50x50 in Matlab?

Illustration
Remingtonsmith - 2020-11-19T11:46:30+00:00
Question: How do I convert this into a 2d matrix of 50x50 in Matlab?

(1,1) 0.4202 (2,1) 0.7436 (3,1) 1.7309 (4,1) 1.2414 (5,1) 1.4897 (6,1) 1.6088 (7,1) 3.1441 (8,1) 3.4509 (9,1) 4.1381 (10,1) 3.3498 (11,1) 4.3164 (12,1) 3.3340 (1,2) 1.8620 (2,2) 2.2873 (3,2) 1.6744 (4,2) 0.4920 (5,2) 1.4422 (6,2) 1.8425 (7,2) 3.6814 (8,2) 5.7407 (9,2) 5.4347 (10,2) 5.2280 (11,2) 4.6420 (12,2) 4.5698 (13,2) 3.8921 (14,2) 2.1604 (15,2) 1.5993 (1,3) 2.6415 (2,3) 2.2709 (3,3) 2.7251 (4,3) 3.3770 (5,3) 3.0060 (6,3) 2.5969 (7,3) 4.6984 (8,3) 6.0326 (9,3) 5.6671 (10,3) 5.2275 (11,3) 5.7066 (12,3) 4.9867 (13,3) 4.8727 (14,3) 3.9140 (15,3) 3.5201 (16,3) 2.0049 (17,3) 1.1442 (1,4) 2.0544 (2,4) 2.5211 (3,4) 4.1816 (4,4) 4.7489 (5,4) 5.9058 (6,4) 4.6013 (7,4) 5.1882 (8,4) 6.7727 (9,4) 7.1471 (10,4) 7.7398 (11,4) 8.2685 (12,4) 6.4927 (13,4) 5.9138 (14,4) 4.8126 (15,4) 4.3724 (16,4) 2.0019 (17,4) 1.3203 (18,4) 1.3599 (1,5) 3.1787 (2,5) 3.2879 (3,5) 3.5375 (4,5) 5.9427 (5,5) 8.0822 (6,5) 7.0689 (7,5) 5.7137 (8,5) 7.2579 (9,5) 7.6235 (10,5) 7.6743 (11,5) 9.6143 (12,5) 7.5071 (13,5) 6.5945 (14,5) 5.0749 (15,5) 3.9087 (16,5) 2.4323 (17,5) 1.4495 (18,5) 1.8497 (19,5) 0.5824 (1,6) 3.1987 (2,6) 4.6763 (3,6) 5.2410 (4,6) 6.6598 (5,6) 8.1118 (6,6) 7.5800 (7,6) 6.8130 (8,6) 7.4356 (9,6) 7.4284 (10,6) 7.4217 (11,6) 9.7472 (12,6) 8.6232 (13,6) 6.9938 (14,6) 5.5148 (15,6) 4.7773 (16,6) 3.0847 (17,6) 2.1310 (18,6) 2.1329 (19,6) 2.2797 (20,6) 1.6630 (1,7) 4.4015 (2,7) 4.3635 (3,7) 5.7831 (4,7) 7.7145 (5,7) 7.2658 (6,7) 6.9811 (7,7) 6.9357 (8,7) 7.7036 (9,7) 8.2682 (10,7) 9.1576 (11,7) 10.3030 (12,7) 8.6424 (13,7) 7.6560 (14,7) 6.7439 (15,7) 5.7805 (16,7) 3.9474 (17,7) 2.2343 (18,7) 2.1285 (19,7) 2.0059 (20,7) 1.7024 (1,8) 4.6970 (2,8) 4.1734 (3,8) 5.2578 (4,8) 5.9685 (5,8) 6.2861 (6,8) 6.4712 (7,8) 6.6437 (8,8) 7.3427 (9,8) 9.7350 (10,8) 10.3477 (11,8) 9.9927 (12,8) 8.8061 (13,8) 7.9539 (14,8) 6.8682 (15,8) 5.9688 (16,8) 4.1078 (17,8) 3.0185 (18,8) 3.0361 (19,8) 2.0127 (20,8) 1.9049 (21,8) 1.6000 (1,9) 3.7279 (2,9) 4.5797 (3,9) 5.0616 (4,9) 5.7144 (5,9) 6.2728 (6,9) 7.3080 (7,9) 8.3617 (8,9) 7.8622 (9,9) 9.6703 (10,9) 9.3207 (11,9) 9.7355 (12,9) 9.8038 (13,9) 8.0067 (14,9) 7.1382 (15,9) 6.2931 (16,9) 3.8839 (17,9) 3.7892 (18,9) 3.2659 (19,9) 2.0040 (20,9) 1.3343 (21,9) 2.1497 (1,10) 4.7494 (2,10) 4.5795 (3,10) 5.0544 (4,10) 6.3996 (5,10) 7.6207 (6,10) 8.2105 (7,10) 9.1596 (8,10) 8.8253 (9,10) 9.8893 (10,10) 9.7927 (11,10) 9.4061 (12,10) 9.1098 (13,10) 8.3242 (14,10) 6.7905 (15,10) 5.5648 (16,10) 4.7176 (17,10) 4.4667 (18,10) 3.8119 (19,10) 2.2864 (20,10) 1.6342 (21,10) 2.9229 (1,11) 5.3591 (2,11) 5.8160 (3,11) 5.7354 (4,11) 6.7509 (5,11) 8.1711 (6,11) 9.2917 (7,11) 10.6259 (8,11) 11.1982 (9,11) 11.1274 (10,11) 10.8622 (11,11) 11.2107 (12,11) 10.1185 (13,11) 8.9153 (14,11) 7.2891 (15,11) 6.2147 (16,11) 5.1402 (17,11) 5.2723 (18,11) 5.1388 (19,11) 3.3813 (20,11) 2.8768 (21,11) 4.0770 (22,11) 4.1643 (1,12) 5.9121 (2,12) 6.4385 (3,12) 6.0893 (4,12) 7.7201 (5,12) 9.7367 (6,12) 10.8800 (7,12) 12.1165 (8,12) 13.0542 (9,12) 12.8097 (10,12) 12.1371 (11,12) 12.2551 (12,12) 10.7736 (13,12) 8.9056 (14,12) 7.9391 (15,12) 6.5584 (16,12) 5.2469 (17,12) 5.1327 (18,12) 4.1530 (19,12) 3.3970 (20,12) 4.3444 (21,12) 4.8801 (22,12) 4.3879 (1,13) 6.0417 (2,13) 5.8006 (3,13) 7.8302 (4,13) 10.3152 (5,13) 11.3032 (6,13) 12.4351 (7,13) 14.2537 (8,13) 15.1248 (9,13) 15.1016 (10,13) 14.3498 (11,13) 13.3902 (12,13) 11.3975 (13,13) 9.8523 (14,13) 8.3738 (15,13) 7.1726 (16,13) 6.1116 (17,13) 5.1625 (18,13) 4.1386 (19,13) 4.1523 (20,13) 3.9218 (21,13) 4.4169 (22,13) 3.3785 (1,14) 5.6596 (2,14) 7.0580 (3,14) 9.6134 (4,14) 11.1078 (5,14) 10.5983 (6,14) 13.0499 (7,14) 14.8601 (8,14) 16.2140 (9,14) 16.5757 (10,14) 15.1365 (11,14) 13.8071 (12,14) 12.3562 (13,14) 11.4255 (14,14) 10.2601 (15,14) 7.9871 (16,14) 6.4657 (17,14) 5.0420 (18,14) 3.3513 (19,14) 3.7979 (20,14) 3.0976 (21,14) 3.2044 (22,14) 2.9040 (1,15) 6.8855 (2,15) 7.7767 (3,15) 7.8288 (4,15) 9.6157 (5,15) 12.2664 (6,15) 15.7095 (7,15) 16.4629 (8,15) 17.1333 (9,15) 17.2975 (10,15) 15.9605 (11,15) 13.8820 (12,15) 12.7841 (13,15) 12.4059 (14,15) 10.6287 (15,15) 8.0601 (16,15) 5.5818 (17,15) 4.8278 (18,15) 3.5542 (19,15) 3.9227 (20,15) 3.5349 (21,15) 2.6261 (22,15) 3.5905 (1,16) 10.9376 (2,16) 8.3849 (3,16) 9.8612 (4,16) 12.2893 (5,16) 14.5439 (6,16) 16.7365 (7,16) 18.1846 (8,16) 19.1413 (9,16) 19.6916 (10,16) 18.8489 (11,16) 16.7673 (12,16) 14.5521 (13,16) 13.3714 (14,16) 11.0369 (15,16) 8.4007 (16,16) 6.1993 (17,16) 5.1378 (18,16) 4.3663 (19,16) 2.9521 (20,16) 4.2068 (21,16) 3.2083 (22,16) 2.7436 (23,16) 2.2416 (1,17) 9.2531 (2,17) 9.0354 (3,17) 10.9880 (4,17) 12.8685 (5,17) 14.9410 (6,17) 16.7457 (7,17) 19.5340 (8,17) 20.9997 (9,17) 20.8071 (10,17) 20.3973 (11,17) 19.4939 (12,17) 17.0814 (13,17) 13.3794 (14,17) 11.9277 (15,17) 9.6353 (16,17) 6.4187 (17,17) 5.1035 (18,17) 4.4186 (19,17) 3.3161 (20,17) 4.3911 (21,17) 3.0913 (22,17) 2.5161 (23,17) 3.7165 (1,18) 9.4117 (2,18) 9.1686 (3,18) 10.7143 (4,18) 13.5995 (5,18) 16.0781 (6,18) 17.4484 (7,18) 19.8363 (8,18) 21.2916 (9,18) 21.3539 (10,18) 20.8427 (11,18) 20.3248 (12,18) 16.6610 (13,18) 14.2692 (14,18) 12.8505 (15,18) 9.3046 (16,18) 7.4412 (17,18) 5.7944 (18,18) 4.4734 (19,18) 4.2753 (20,18) 3.9457 (21,18) 3.0353 (22,18) 3.2045 (23,18) 3.4280 (1,19) 7.8982 (2,19) 8.7271 (3,19) 9.4924 (4,19) 12.0337 (5,19) 15.2512 (6,19) 16.1631 (7,19) 17.4826 (8,19) 20.4904 (9,19) 20.8509 (10,19) 19.1487 (11,19) 18.8619 (12,19) 16.8586 (13,19) 14.8098 (14,19) 12.5813 (15,19) 9.1794 (16,19) 7.1567 (17,19) 5.2043 (18,19) 4.9213 (19,19) 4.8783 (20,19) 4.9186 (21,19) 3.1271 (22,19) 3.1874 (23,19) 2.8131 (1,20) 8.9670 (2,20) 9.5909 (3,20) 10.0273 (4,20) 10.3003 (5,20) 12.1647 (6,20) 13.8264 (7,20) 17.7440 (8,20) 18.5717 (9,20) 18.0930 (10,20) 18.0775 (11,20) 17.9509 (12,20) 15.9163 (13,20) 14.2225 (14,20) 11.6205 (15,20) 9.2698 (16,20) 6.0012 (17,20) 4.2778 (18,20) 4.3282 (19,20) 4.6347 (20,20) 4.4741 (21,20) 3.0327 (22,20) 2.7962 (23,20) 1.3637 (1,21) 8.6349 (2,21) 10.1144 (3,21) 9.9551 (4,21) 10.4981 (5,21) 11.2886 (6,21) 12.5134 (7,21) 15.3798 (8,21) 16.0664 (9,21) 16.7938 (10,21) 16.6951 (11,21) 14.3147 (12,21) 13.6172 (13,21) 12.6967 (14,21) 10.2413 (15,21) 8.6564 (16,21) 4.9046 (17,21) 4.7540 (18,21) 4.7495 (19,21) 4.0771 (20,21) 3.2822 (21,21) 3.7969 (22,21) 1.8492 (23,21) 0.9588 (1,22) 6.9787 (2,22) 9.2650 (3,22) 9.1583 (4,22) 10.5382 (5,22) 11.8333 (6,22) 12.3261 (7,22) 12.1823 (8,22) 13.0030 (9,22) 15.0308 (10,22) 12.8139 (11,22) 11.3900 (12,22) 11.9647 (13,22) 11.1102 (14,22) 9.1133 (15,22) 8.8671 (16,22) 6.8595 (17,22) 4.9243 (18,22) 4.3566 (19,22) 4.8363 (20,22) 3.2136 (21,22) 2.6509 (22,22) 2.3154 (1,23) 6.0732 (2,23) 7.7432 (3,23) 7.9827 (4,23) 8.6219 (5,23) 11.7454 (6,23) 12.2462 (7,23) 11.1332 (8,23) 10.5216 (9,23) 11.7601 (10,23) 10.6455 (11,23) 9.8848 (12,23) 9.7464 (13,23) 9.3480 (14,23) 8.0205 (15,23) 8.0799 (16,23) 7.8393 (17,23) 5.9411 (18,23) 4.5890 (19,23) 5.1380 (20,23) 4.0581 (21,23) 3.9683 (22,23) 2.8897 (1,24) 4.9820 (2,24) 5.8060 (3,24) 6.8107 (4,24) 7.8805 (5,24) 8.8074 (6,24) 10.3648 (7,24) 9.4551 (8,24) 7.2467 (9,24) 7.5980 (10,24) 5.9659 (11,24) 5.4242 (12,24) 5.3210 (13,24) 5.2021 (14,24) 4.0100 (15,24) 4.4030 (16,24) 3.9475 (17,24) 3.8158 (18,24) 3.8589 (19,24) 3.8741 (20,24) 4.3950 (21,24) 4.8646 (22,24) 2.4708 (1,25) 3.0736 (2,25) 3.7469 (3,25) 5.8498 (4,25) 6.9072 (5,25) 7.2185 (6,25) 6.8126 (7,25) 7.0900 (8,25) 5.2704 (9,25) 3.7446 (10,25) 2.5910 (11,25) 2.2498 (12,25) 2.1832 (13,25) 1.8176 (15,25) 1.2234 (16,25) 1.9483 (17,25) 2.3136 (18,25) 2.7259 (19,25) 2.9808 (20,25) 3.7880 (21,25) 4.6799 (1,26) 2.5939 (2,26) 2.5053 (3,26) 2.5204 (4,26) 3.9437 (5,26) 4.5815 (6,26) 3.6407 (7,26) 2.5909 (8,26) 2.5147 (9,26) 1.9837 (1,27) 2.6591 (2,27) 1.9359 (3,27) 1.5022 (4,27) 1.7123 (5,27) 0.8736 (6,27) 1.3791 (1,28) 2.1100 (2,28) 2.9467 (3,28) 1.2678 (4,28) 0.3169 (1,29) 1.7743 (2,29) 2.1800 (3,29) 0.4461

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

"... I copied the values from Matlab's command window directly …"
 
 
That means it is a sparse matrix based on the format of the output. If you want a full matrix format, simply do this:
 
x = your current sparse matrix
x = full(x);  % convert to full matrix


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!