Hello! I have preallocated the variable S with:S = cell(3,2); I want to assign the matrix [0 0 0] to each cell element, like this:
[0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0] [0 0 0]
I know that num2cell(zeros(3,2)) will give me
[0] [0] [0] [0] [0] [0]
Does anybody know if there is any way I can do this without using a for loop to assign [0 0 0] to each of the cell element? Thanks!
Best Answer