找回密码
 注册
关于网站域名变更的通知
查看: 993|回复: 3
打印 上一主题 下一主题

Matlab怎么把元胞数组转化成矩阵?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2021-6-30 09:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x

3 Y( J% F' m8 r2 H" c& A! _" j, K/ g- g9 s/ P/ A
Matlab里怎么把元胞数组的内容转化为矩阵?(元胞数组的每个元胞都是double型的数)。9 v$ x) Z$ {7 c( M! O3 O1 }/ G

该用户从未签到

2#
发表于 2021-6-30 11:11 | 只看该作者
定义一个矩阵,然后把数组放进去啊

该用户从未签到

3#
发表于 2021-6-30 11:11 | 只看该作者
help cell2mat

该用户从未签到

4#
发表于 2021-6-30 11:31 | 只看该作者
CELL2MAT Convert the contents of a cell array into a single matrix.) }# S" `" ?+ n2 C' D" j$ R
    M = CELL2MAT(C) converts a multidimensional cell array with contents of
( G0 j% w' c' B& b    the same data type into a single matrix. The contents of C must be able
' y" ^- o# V% }$ u3 m  S. q    to concatenate into a hyperrectangle. Moreover, for each pair of; `2 ~* J8 D5 e. j0 f5 V" h
    neighboring cells, the dimensions of the cell's contents must match,
$ I2 t. J" I  ~& A: U6 ^, h    excluding the dimension in which the cells are neighbors. This constraint% R5 {% R6 P  |3 V% D: P) h5 P
    must hold true for neighboring cells along all of the cell array's
, }% S; x  j: a+ s5 m    dimensions.( x! v6 ~3 A/ {" ^& [3 t
+ `; c. S% W7 S) s7 i% v
    The dimensionality of M, i.e. the number of dimensions of M, will match
- ]6 v: x4 F2 B    the highest dimensionality contained in the cell array./ l# A4 f8 W! y# C
& ]" q3 |3 [: X4 W6 t5 B3 M
    CELL2MAT is not supported for cell arrays containing cell arrays or- c. f, h+ g: {# ]9 p* n3 b
    objects.! Q; f6 H! f2 ?# i- w

* o% b  H7 x% J9 ?        Example:' f3 y8 A9 S7 N0 \, o" M! F
           C = {[1] [2 3 4]; [5; 9] [6 7 8; 10 11 12]};
0 [) f0 I& D& e6 p, O4 S+ T$ I           M = cell2mat(C)
: m: D/ v7 A9 K2 A
! w$ I. y! B6 y; k1 n        See also mat2cell, num2cell
$ h+ d4 a- G/ K4 }% ?' Q0 p9 \4 A1 M' G; @) r2 }
    Overloaded methods:& r! P. u7 D! \6 N
       distributed/cell2mat
) X0 D4 O8 B$ X
& s  _7 H* k9 q6 ~- G  M1 \    Reference page in Help browser
, s; K" d9 I% d' b       doc cell2mat! g4 D' ]0 b. ]' c5 V# _
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-6-18 01:08 , Processed in 0.062500 second(s), 23 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表