How to convert cells within cells to double.

2 visualizaciones (últimos 30 días)
Farshid Daryabor
Farshid Daryabor el 2 de Mzo. de 2020
Comentada: Farshid Daryabor el 2 de Mzo. de 2020
I really thanks anyone for any comment how to convert the attached file to double. I tried the following comment but it doesn't work.
>> out = cell2mat(cellfun(@cell2mat,T_mon,'un',0));
Error using cat
Dimensions of matrices being concatenated are not consistent.
Error in cell2mat (line 75)
m{n} = cat(2,c{n,:});

Respuesta aceptada

Stephan
Stephan el 2 de Mzo. de 2020
Editada: Stephan el 2 de Mzo. de 2020
Due to the different lengths of all the entries you can not easily store them in a matrix, but as a column vector it will work easy:
T_mon_new = [T_mon{1,:}];
T_mon_new = vertcat(T_mon_new{1,:});

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by