Convert cell array into array

4 visualizzazioni (ultimi 30 giorni)
Valerio Gianforte
Valerio Gianforte il 28 Feb 2020
Hi Everyone,
I have a cell array 12x5 where each element is datetime array. Someone knows how to convert cell array into datetime array? To be clearer I would like to obtain an array with size 1472x1 . Thanks.
12×1 cell array
{125×1 datetime}
{113×1 datetime}
{125×1 datetime}
{121×1 datetime}
{125×1 datetime}
{121×1 datetime}
{125×1 datetime}
{125×1 datetime}
{121×1 datetime}
{125×1 datetime}
{121×1 datetime}
{125×1 datetime}

Risposta accettata

Bhaskar R
Bhaskar R il 28 Feb 2020
result = cellfun(@vertcat, vertcat(your_array{:}))
  3 Commenti
Bhaskar R
Bhaskar R il 28 Feb 2020
vertcat(time_date{:}) % try this
Valerio Gianforte
Valerio Gianforte il 28 Feb 2020
Ok, now it does work. Thank you so much.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by