How to take a rectangular matrix of numbers and turn it into a matrix of the form (row, column, number)?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Edward Boyd
am 3 Feb. 2015
Kommentiert: Edward Boyd
am 3 Feb. 2015
I want to take a matrix of around 300 rows and 300 columns and put it into the form (row, column, number)
Any help would be appreciated a lot.
Thanks :)
0 Kommentare
Akzeptierte Antwort
Michael Haderlein
am 3 Feb. 2015
If m is your matrix:
m=rand(3,2);
[1+mod(0:numel(m)-1,size(m,1))' 1+fix((0:numel(m)-1)/size(m,1))' m(:)]
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Shifting and Sorting Matrices 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!