How can I extract data from table keeping while keeping the floating point?

2 visualizaciones (últimos 30 días)
Hi,
I am quite new at the data type table, and I am trying to extract some variables in order to use them as classification features.
I am extracting them like this: observations=msr{1:height(msr),{'DNA_Area','DNA_Eccentricity','DNA_Perimeter','DNA_MeanIntensity','DNA_MaxIntensity','DNA_StandardDeviation','DNA_Mass','DNA_P2A'}} ;
When I do this all values are rounded to the closest integer. The problem is that most of them are values between [0,1] and I need to keep the floating point.
Thanks in advance,

Respuesta aceptada

Brendan Hamm
Brendan Hamm el 1 de Jul. de 2015
Editada: Brendan Hamm el 1 de Jul. de 2015
The only reason this would happen is if at least one of the columns is of class uint*, where * could be 8, 16, etc.. The issue is that the result of indexing multiple variables from your table will cast all variables to the uint* class. I would consider changing the variable with integer type in the table to a double and this will solve your problem.
If you type:
summary(msr)
this will tell you the size, class and summary statistics for each variable.

Más respuestas (0)

Categorías

Más información sobre Logical 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!

Translated by