how to duplicate the values in one matrix create another matrix of specific dimension
16 views (last 30 days)
i have a cell array of dimension 1x60, each matrix in cell array is of dimension 23x23 of double datatype
i converted this cell array to matrix using cell2mat and got a matrix A, of dimension 23x1380
how can i duplicate the values in the matrix A, to create another matrix B, of dimension 368x19872 double datatype using any suitable pattern
The values can be duplicated in any suitable pattern to achieve a matrix of dimension 368x19872 (either from [1 2 3] to [1 1 1 2 2 2 3 3 3] or to [1 2 3 1 2 3 1 2 3])
is it possible to get a matrix of dimension 368x19872, from the cell array 1x60 directly without converting to matrix of dimension 23x1380 ?
any suitable replicating method can be choosen. only the output dimension with the same data values is needed
ME on 1 Nov 2019
Assuming you want the rest of the larger matrix to be zeros, then you could use:
B(1:s(1),1:s(2)) = A;
This will set A as the first 23x1380 elements of B. Is that what you wanted?