How to convert a matrix to cell array of vectors?

10 Ansichten (letzte 30 Tage)
Mr M.
Mr M. am 18 Okt. 2016
Beantwortet: Andrei Bobrov am 18 Okt. 2016
I have a matrix M x N matrix: R. r1 = R(1,:); r2 = R(2,:); etc. How to create cell array {r1,r2,...} from R automatically?

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 18 Okt. 2016
out = num2cell(R,2);

Weitere Antworten (0)

Kategorien

Mehr zu Resizing and Reshaping 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!

Translated by