How to convert a matrix to cell array of vectors?

4 vues (au cours des 30 derniers jours)
Mr M.
Mr M. le 18 Oct 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?

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 18 Oct 2016
out = num2cell(R,2);

Plus de réponses (0)

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by