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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
- g& ~9 F& p; {5 Y! Q7 I) u

* u7 b/ Y1 Q7 c8 mMatlab里怎么把元胞数组的内容转化为矩阵?(元胞数组的每个元胞都是double型的数)。" M& f7 I/ T: U: q1 Z) y

该用户从未签到

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.. Y# u5 K" _1 J% V' [6 m. D5 _
    M = CELL2MAT(C) converts a multidimensional cell array with contents of; E6 U1 I/ e, B
    the same data type into a single matrix. The contents of C must be able
( |/ M# B6 U3 s1 t0 n3 F0 d, N% H    to concatenate into a hyperrectangle. Moreover, for each pair of2 i4 J9 i' r! K0 b6 F; y
    neighboring cells, the dimensions of the cell's contents must match," ]' @& U; l1 J( z" X2 u6 p
    excluding the dimension in which the cells are neighbors. This constraint2 c# \) r' A1 N1 N
    must hold true for neighboring cells along all of the cell array's6 N" |+ q9 l) X+ ~
    dimensions.
* G+ ^3 v6 h! f6 b+ Y( M5 q5 S1 L; I( b
    The dimensionality of M, i.e. the number of dimensions of M, will match
7 U& ~7 e, C+ |. f' M  o/ y    the highest dimensionality contained in the cell array.6 O. J9 c) V2 Y$ L2 l9 C
8 r+ ^* W' ], S
    CELL2MAT is not supported for cell arrays containing cell arrays or
2 @; f* k- T% w) R0 r$ y    objects.$ X* E' a. U' a0 `7 P& Z/ g5 j
6 ~/ i  ?0 |1 }+ |: d
        Example:
2 q! L' P) U7 f5 s, I           C = {[1] [2 3 4]; [5; 9] [6 7 8; 10 11 12]};
* y+ h) p+ _, k8 c" Q           M = cell2mat(C)
+ p. K0 ]6 i0 ]. @4 |; X
2 }$ Z3 R) Q& a/ S2 W4 Z/ e        See also mat2cell, num2cell
; r9 B- b. U0 ~- R9 G( }# q' _4 b; K7 L1 i! e% Z7 d6 s  M
    Overloaded methods:
+ c4 H4 o& K7 a- I9 k- f: E5 `       distributed/cell2mat8 B  e* U3 `% \" x
* z$ _9 n" Y" b% R0 R9 [2 M  d
    Reference page in Help browser  R$ d2 g7 C  c) N
       doc cell2mat9 W5 l, f% h% N5 w3 }) i3 P3 ?! t
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

EDA365公众号

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

GMT+8, 2025-11-23 23:34 , Processed in 0.140625 second(s), 24 queries , Gzip On.

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

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

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