How to convert a cell array of datetime to an array of datetime
29 次查看(过去 30 天)
显示 更早的评论
Hi, Is there a simple way to convert a cell array of datetime to an array of datetime without using cellfun? My cell array looks like:
32×1 cell array
{[01-May-2018]}
{[01-May-2018]}
{[01-May-2018]}
{[01-May-2018]}
{[01-May-2018]}
{[01-May-2018]}
I would like it to be just an array of datetime. Thanks for any help.
0 个评论
采纳的回答
Ameer Hamza
2018-5-29
Try this
array = [cellArray{:}];
[] symbol are necessary to form an array.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!