reshape
重塑阵列
Syntax
b =重塑(a,sz)
b = reshape(a,sz1,...,szn)
Description
重塑B
= reshape(A
,sz1,...,szN
)A
进入sz1
-by-。。。
-by-szN
array wheresz1,...,szN
indicates the size of each dimension. You can specify a single dimension size of[]
to have the dimension size automatically calculated, such that the number of elements inB
matches the number of elements inA
。For example, ifA
is a 10-by-10 matrix, thenreshape(A,2,2,[])
重塑the 100 elements ofA
进入2-by-2-by-25 array.
Examples
Input Arguments
Output Arguments
Extended Capabilities
在R2006a之前引入
这个话题有帮助吗?