To combine different cells with empty columns together
Show older comments
Hi. I want to combine three different cells in a cell with additional empty columns..
funct1 =
'Q7'
'Q12F'
'Q12G'
'Q12H'
'Q12I'
'Q12L'
'Q12M'
funct2 =
'Q12G'
'Q12H'
'Q12I'
'Q12L'
'Q12M'
funct3 =
'Q12G'
'Q12H'
'Q12I'
Final cell will become like this.
funct =
'Q7' [] 'Q12G' [] 'Q12G' []
'Q12F' [] 'Q12H' [] 'Q12H' []
'Q12G' [] 'Q12I' [] 'Q12I' []
'Q12H' [] 'Q12L' [] [] []
'Q12I' [] 'Q12M' [] [] []
'Q12L' [] [] [] [] []
'Q12M' [] [] [] [] []
Could anyone show me how?
Accepted Answer
More Answers (1)
funct1 = {'Q7';'Q12F';'Q12G';'Q12H';'Q12I';'Q12L';'Q12M'};
funct2 = {'Q12G';'Q12H';'Q12I';'Q12L';'Q12M'};
funct3 = {'Q12G';'Q12H';'Q12I'};
funct0 = cell(size(funct1));
funct2{length(funct1)}= [];
funct3{length(funct1)}= [];
functt = [funct1 funct0 funct2 funct0 funct3 funct0]
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!