Create a cell array containing the first 3 doubles from another cell array
显示 更早的评论
Hello,
I have a cell araay CCC (500x1 cell), containing 500x1 doubles.
I would like to create a new cell array (a) with just the first three doubles (500x1 each) from CCC.
I tried with a = {CCC{1}:CCC{3}}; but is not working, how can I do it?
Thanks in advance for the help :)
采纳的回答
更多回答(1 个)
Bjorn Gustavsson
2022-7-5
Would:
ThreeFirst = cell2mat(CCC(1:3));
do the trick?
类别
在 帮助中心 和 File Exchange 中查找有关 Data Types 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!