merging a double matrix within a cell array
Ältere Kommentare anzeigen
Hello,
I can't find the solution of merging a double matrix within a cell array:
A matrix m x n, C, where two contiguous elements within a
C=[1 5 3 7]
[2 6 4 8]
And in the Cell matrix D: D {1,:}= column headers D{:,1}= row headers
and therefore when merging C within D, each element in the cell will have two contiguous values from C, for example:
D {2,2} = [1 5] %first row and first two columns of C
D{3,4} = [4 8] %second row and last two columns of C
I am just trying to find a way to automate the merging.
Any input would be appreciated!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!