Convert cell to matrix
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Martin Park
el 6 de Oct. de 2013
Respondida: Jan
el 6 de Oct. de 2013
I have the following {'128' '256' '157' '54'} How can I convert it to a numeric matrix for example 128 256 157 54
Respuesta aceptada
Más respuestas (1)
Jan
el 6 de Oct. de 2013
Faster than str2double:
C = {'128' '256' '157' '54'};
S = sprintf('%s*', C{:});
D = sscanf(S, '%g*');
0 comentarios
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!