How to convert a cell array of datetime to an array of datetime

28 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 29 de Mayo de 2018
Try this
array = [cellArray{:}];
[] symbol are necessary to form an array.

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by