Cell数据调取每个元素的前几位。
Show older comments
如图,我想取cell型数组A(在图片里)里每一个元素的前8位,然后转换成double类型放入变量B里。我输入了下面两个命令,都报错了:需要大括号或点索引表达式中的一个输出,但结果有 2797 个。

B = A{:}(1:8);
B = cellfun(@cell2mat,A{:}(1:8));
我想要的B的数据是这样子:
20060109
20060110
20060111
20060112
...
请问一下要怎么弄,谢谢!
Accepted Answer
More Answers (0)
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!