MATLAB:存储在单元格数组中的访问时间表

发布于 2025-02-05 18:20:43 字数 556 浏览 1 评论 0原文

我有多个包含n*1数组的垫子文件。

这些阵列中的每个单元格都包含一个1 * 1个次数(尺寸6 * n):

“在此处输入图像描述”

单元格1:1 {1x1 timseries}的内容:

sstatic.net/su1qk.png“ rel =“ nofollow noreferrer 要使用工作空间查看数据,但是当我尝试打印单元格的数据时,我只会得到{1x1 timseries}或错误,例如“对于此类变量,不支持DOT索引”。当我做cell.data时。

您知道如何访问单元格内的数据吗?我的目标是xetract每个单元格的数据以生成一个大的CSV文件。

I have multiple mat files containing n*1 array.

Each of the cell in these arrays contain a 1 * 1 timeseries (size 6*n) :

enter image description here

Content of cell 1:1 {1x1 timseries}:

enter image description here

I am able to see the data using the workspace but when I try to print the data of a cell I only get {1x1 timseries} or error like "Dot indexing is not supported for variables of this type." when I do cell.Data.

Do you know how can I access the data inside a cell ? My goal is to xetract the data of each cell to generate a big csv file.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凌乱心跳 2025-02-12 18:20:43

使用()表示法以访问数组或向量中的项目,并使用{}符号访问内容。例如:

>> cellarray={[1,2,3],[4,5,6],[7,8]}

cellarray =

  1×3 cell array

    {1×3 double}    {1×3 double}    {1×2 double}

>> cellarray(2)

ans =

  1×1 cell array

    {1×3 double}

>> cellarray{2}

ans =

     4     5     6

>> cellarray{1}(2)

ans =

     2

我认为在您的情况下,您想使用cell {data}之类的东西。

Use () notation to access an item in an array or vector, and use {} notation to access the contents. For example:

>> cellarray={[1,2,3],[4,5,6],[7,8]}

cellarray =

  1×3 cell array

    {1×3 double}    {1×3 double}    {1×2 double}

>> cellarray(2)

ans =

  1×1 cell array

    {1×3 double}

>> cellarray{2}

ans =

     4     5     6

>> cellarray{1}(2)

ans =

     2

I think in your case you want to use something like cell{Data}.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文