Cell to mat conversion
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (1)
iwant = reshape(cell2mat(a),[],length(a))' ;
iwant(1,:)
3 Commenti
Chandan Prakash
il 24 Feb 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
il 24 Feb 2021
Categorie
Scopri di più su Cell Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!