Error while using kstat2 function: Out of range or non-integer values truncated during conversion to character.

1 view (last 30 days)
I am using Kolmogorov-Smirnov test to compare 2 datasets. [h,p] = kstest2('Y1','Y2')
Y1 and Y2 are my datasets. They are DataMatrix format from a microarray(generated with matlab's affyrma function) Each contains a single column of data with thousands of rows. Each row has a row heading and the column has its own heading.
The values in each dataset are mostly from -3 to 3, possibly some NaN's in there.
I obtain this error: Out of range or non-integer values truncated during conversion to character. > In kstest2 at 152
To try and figure out what's causing this I've made some mock vectors w/NaN's as well as difference number combinations and the kstest2 function has worked fine in those tests.
Any idea what it means and what is the cause?
  4 Comments
Vanessa
Vanessa on 2 Jun 2014
Datasets from microarrays is in the DataMatrix format so how to use various Matlab functions with DataMatrix might be the actual issue. (Or how to convert the data into a useable format?)
Vanessa
Vanessa on 2 Jun 2014
In addition to kstest2, many of the other functions I was trying to use on my data did not work. They all give the same error: (Error using bioma.data.DataMatrix/subsref (line 45) DataMatrix subscripts must be two-dimensional.)
For the time being, I found I can use the double function to access the data so I can use functions. (See below).
If there is a better way, please advise.
>> mini_set_X2
mini_set_X2 =
022714JB14
10700001 0.52189
10700003 0.87869
10700004 0.49216
10700005 1.1703
10700013 0.71538
10700014 1.1207
10700020 0.47076
10700027 0.9894
10700029 0.15174
10700040 1.0981
>> data2=double(mini_set_X2(:,:))
data2 =
0.5219
0.8787
0.4922
1.1703
0.7154
1.1207
0.4708
0.9894
0.1517
1.0981

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!