convert table to array or matrix
Mostrar comentarios más antiguos
I have table with some extracted features like intensity, area, and diameter.these values is real values.
when I convert this table to an array, all data converted to be from 0 to 255 but I need my data in the array exactly as it in the table.....please help
1 comentario
Walter Roberson
el 30 de Ag. de 2015
What command are you using to convert the table to an array?
Respuesta aceptada
Más respuestas (1)
Peter Perkins
el 31 de Ag. de 2015
0 votos
There are two ways to converta table to a (numeric in this case) array:
1) call table2array 2) use {} subscripting for the variables you want to extract
You say, "all data converted to be from 0 to 255". Tables are all about mixed data types - one container with doubles, uints, strings, whatever in it. When you "convert to an array", what you're really doing is "converting to a single data type". So by MATLAB's precedence rules, if your table has some uint8's in it, everything (numeric) will be converted to uint8, because that's the only way you can get everything into one homogeneous array.
To get an array of doubles, you'll need to convert the non-double variables to double first.
1 comentario
hanem ellethy
el 2 de Sept. de 2015
Categorías
Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!