Cell to mat conversion
Show older comments
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.
Accepted Answer
More Answers (1)
iwant = reshape(cell2mat(a),[],length(a))' ;
iwant(1,:)
3 Comments
Chandan Prakash
on 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
on 24 Feb 2021
Categories
Find more on Cell Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!