Create Matrix using loop
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sydney Lavan
am 7 Apr. 2020
Kommentiert: Sydney Lavan
am 7 Apr. 2020
I have a data file containing 2,239,488 values. I need to arrange these values in a 108*108*192 matrix. The data file is arranged in such matter (0,0,0),(1,0,0),(2,0,0)....(107,0,0),(0,1,0),(2,1,0)...(107,1,0),(0,2,0),(1,2,0).......(107,107,191). i.e. my x coordinates runs fasters (inner loop) and the y in the middle loop and finally z is the outer loop until Ive exhausted the 108*108*192 numbers.
Is there a function or code to take my data file and arrange in such matrix?
Thanks, Sydney
0 Kommentare
Akzeptierte Antwort
David Hill
am 7 Apr. 2020
Look at reshape() function.
reshape(yourMatrix,108,108,192);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!