时间序列所需的cell格式调整
num2cell:数组转换为cell
C = num2cell(A) converts array A into cell array C by placing each element of A into a separate cell in C. Array A need not be numeric.
将数组转换成cell,按照每一个元素分成单个cell
C = num2cell(A,dim) splits the contents of A into separate cells of C, where dim specifies which dimensions of A to include in each cell. dim can be a scalar or a vector of dimensions. For example, if A has 2 rows and 3 columns, then:
num2cell(A,1) creates a 1-by-3 cell array C, where each cell contains a 2-by-1 column of A.
按照列划分cell
num2cell(A,2) creates a 2-by-1 cell array C, where each cell contains a 1-by-3 row of A.
按照行划分cell
num2cell(A,[1 2]) creates a 1-by-1 cell array C, where the cell contains the entire array A.
按照1,2维进行划分,还可以按照[1 3]/[2 3]维进行划分
num2cell:数组转换为cell
C = num2cell(A) converts array A into cell array C by placing each element of A into a separate cell in C. Array A need not be numeric.
将数组转换成cell,按照每一个元素分成单个cell
C = num2cell(A,dim) splits the contents of A into separate cells of C, where dim specifies which dimensions of A to include in each cell. dim can be a scalar or a vector of dimensions. For example, if A has 2 rows and 3 columns, then:
num2cell(A,1) creates a 1-by-3 cell array C, where each cell contains a 2-by-1 column of A.
按照列划分cell
num2cell(A,2) creates a 2-by-1 cell array C, where each cell contains a 1-by-3 row of A.
按照行划分cell
num2cell(A,[1 2]) creates a 1-by-1 cell array C, where the cell contains the entire array A.
按照1,2维进行划分,还可以按照[1 3]/[2 3]维进行划分
mat2cell: 可以将目标划分为想要的m*n cell