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

2 views (last 30 days)
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,

Accepted Answer

Brendan Hamm
Brendan Hamm on 1 Jul 2015
Edited: Brendan Hamm on 1 Jul 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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!