Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have array as
A=cell(4,1);
A=[1;2;3;4];
i have to increase the size of A. i.e to make it 8 for example. when i pad the zeros or simply vertically concatenate the two array(one is A and other is simply e.g B=cell(4,1))
I get the answer like
[4x1 double]
[]
[]
[]
[]
whereas i need output like
1
2
3
4
[]
[]
[]
[]
or if padding zeros then
1
2
3
4
0
0
0
0
plz help me as i need this urgent.. i have tried alot..it works when A matrix is simply an array not a cell array..but in my case i need this for cell array
Posted
Updated 29-Mar-20 13:26pm
v3

1 solution

Well if you have two arrays A and B then you can get the resulting array using the command cat(1, A,B).
Based on the value of the first parameter of the function, internally matlab will call vertcat or horzcat
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900