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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x

3 a) p5 q' y3 f( |! O1 U
3 V5 H  S* i$ k3 b; W6 {% p+ y; ]$ UMatlab里怎么把元胞数组的内容转化为矩阵?(元胞数组的每个元胞都是double型的数)。
+ X2 S$ U' U& I4 x0 l& O

该用户从未签到

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.
2 ]2 b) N& O8 R6 A    M = CELL2MAT(C) converts a multidimensional cell array with contents of
$ L2 L1 K7 s, v- `    the same data type into a single matrix. The contents of C must be able
# w) E6 v2 C& W! |7 M; |    to concatenate into a hyperrectangle. Moreover, for each pair of
3 o  D' L6 a2 y% V4 m/ k    neighboring cells, the dimensions of the cell's contents must match,# Z* p, L8 \% o/ \, ^
    excluding the dimension in which the cells are neighbors. This constraint
9 E4 I9 t& R5 r. E    must hold true for neighboring cells along all of the cell array's4 }5 @! F) u' C
    dimensions.
: H) [, E* o4 X1 q) g5 L! O5 n! W' ~( s' S* b
    The dimensionality of M, i.e. the number of dimensions of M, will match' S8 p+ N6 t* j" N! m
    the highest dimensionality contained in the cell array.' f) r" e, y' F1 N

. F0 p4 r9 j4 f! K3 z/ [    CELL2MAT is not supported for cell arrays containing cell arrays or
/ N& l6 R& M1 I' d    objects.
( Y* e, D0 I1 R
& x: K: R- d+ l$ V$ |" c        Example:1 F* D4 T9 N& {* L0 ?0 ^) ?2 [$ J
           C = {[1] [2 3 4]; [5; 9] [6 7 8; 10 11 12]};
" p6 J4 C+ v/ [- _. L; p. ^- W" D7 U           M = cell2mat(C)% P/ N, m2 B! j
: X" q$ ^+ T  b+ H( I
        See also mat2cell, num2cell
6 V8 \, ~8 \/ h% W; F% r+ b# f9 ~' C6 E$ h+ p! @/ m; Q4 Y
    Overloaded methods:
- O0 b# q; m% C! S: a, D- ~- _, Z       distributed/cell2mat9 G) F1 J; Z4 m- ^

# d3 Q  n7 ~) z3 ]" j    Reference page in Help browser, {; e' n; O7 y: e: V; W
       doc cell2mat
2 u9 \3 M5 ]+ z: {4 w" f9 z
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

EDA365公众号

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

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

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

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

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