How to convert a matrix to cell array of vectors?

10 visualizaciones (últimos 30 días)
Mr M.
Mr M. el 18 de Oct. de 2016
Respondida: Andrei Bobrov el 18 de Oct. de 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?

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 18 de Oct. de 2016
out = num2cell(R,2);

Más respuestas (0)

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by