Cell to mat conversion
Afficher commentaires plus anciens
Hi,
I have a cell array and need to convert to array.
a = {[100, 200, 300, 400, 500], [1000, 2000, 3000, 4000, 5000], [1100,1200, 1300, 1400, 1500]};
for each set b = a(1);
I need array data like,
b = [100, 200, 300, 400, 500];
i tired cell to mat, its not working.
Réponse acceptée
Plus de réponses (1)
iwant = reshape(cell2mat(a),[],length(a))' ;
iwant(1,:)
3 commentaires
Chandan Prakash
le 24 Fév 2021
a = {[100, 200, 300, 400, 500], [1000, 2000, 3000, 4000, 5000], [1100,1200, 1300, 1400, 1500]};
iwant = reshape(cell2mat(a),[],length(a))' ;
iwant(1,:)
Chandan Prakash
le 24 Fév 2021
Catégories
En savoir plus sur Cell Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!