How do I convert a cell into numeric array?
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Fadilla Atyka Nor Rashid
el 25 de Nov. de 2018
Comentada: madhan ravi
el 28 de Nov. de 2018
Good Day everyone.
I have a cell array (1 x 300) which each cell contain 30 x 3 double array as illustrated below.
each of double array contain 30 x 3 data that i wanted to convert to numeric array instead of being saved in a cell array.
Previously, I did convert them manually. Is there anyone having idea how to convert with a code? I have bunch of them that takes longer time by doing it manually.
I have tried a code as below, but useless. can any experts help me on this? Much thanks!
for i = 1:300
for j = 1 : 300
Walk{j} = str2double(W(i));
end
end
0 comentarios
Respuesta aceptada
madhan ravi
el 25 de Nov. de 2018
Editada: madhan ravi
el 25 de Nov. de 2018
[W{:}] %at the end where W is your 1 by 300 cell array
%or
cell2mat(W)
%or
horzcat(W{:})
%or
vertcat(W{:})
4 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Type Conversion en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!