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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x

2 w( w" J+ e, b6 B3 h; o+ U2 ^" G
' F! h( o4 v. h/ _, |, QMatlab里怎么把元胞数组的内容转化为矩阵?(元胞数组的每个元胞都是double型的数)。9 n+ `+ e+ H6 o6 \

该用户从未签到

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." v1 z! Q2 p! g. w  ~6 N; Y, E
    M = CELL2MAT(C) converts a multidimensional cell array with contents of  t! \' X. q( ]) H( n
    the same data type into a single matrix. The contents of C must be able3 q. Y% l) v, o! q6 z/ T
    to concatenate into a hyperrectangle. Moreover, for each pair of0 p% p; F* C, T) s
    neighboring cells, the dimensions of the cell's contents must match,- A; H3 c0 ]# G; j  v
    excluding the dimension in which the cells are neighbors. This constraint' W/ [+ h7 e4 I
    must hold true for neighboring cells along all of the cell array's# B% G6 D: X/ j8 B& f0 i: ?
    dimensions.
7 l) y. X8 A2 m: S
4 y/ D; f4 B. J) M% h0 I: B2 f    The dimensionality of M, i.e. the number of dimensions of M, will match
4 B. X2 [6 _1 ?2 m2 q( |- g4 Y    the highest dimensionality contained in the cell array.
7 e) ]  k0 H1 L4 J- t+ E/ i
# T% X3 s% I  s* K    CELL2MAT is not supported for cell arrays containing cell arrays or
  t4 s9 c/ i% Q/ }' F7 E4 i" Q0 e    objects.
. Y* S4 P' f. c1 r2 X) {( M. G# Z
. P2 r& e9 n/ A" P6 U4 ^0 j        Example:; e3 [9 b* }% i7 }& y
           C = {[1] [2 3 4]; [5; 9] [6 7 8; 10 11 12]};9 t: i( z! T/ d: {: q5 q, v
           M = cell2mat(C)
9 C4 Z7 z. A7 S) s1 x, t9 D' A2 |4 B
        See also mat2cell, num2cell
8 S" B) x0 f' f' G0 |6 Q3 H7 r/ e2 q+ h% t7 u6 _( q7 J1 q6 _' R9 @( S) ^; c
    Overloaded methods:2 I, U! d- j5 @& W& p8 O
       distributed/cell2mat" N! V. u: H( b9 ^1 Q! n" z/ |' v2 l

0 @5 z/ L8 {0 N- O4 p' B' P    Reference page in Help browser, r% \. W1 ~- \, s# x2 g  V! r
       doc cell2mat% g* X) o! q0 Q3 l
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

EDA365公众号

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

GMT+8, 2025-8-4 14:39 , Processed in 0.109375 second(s), 23 queries , Gzip On.

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

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

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