フィルターのクリア

Organize Data into Different Matrices by Column entry

2 ビュー (過去 30 日間)
Kevin
Kevin 2013 年 7 月 2 日
Hey guys,
I have a massive set of data that covers all 23 human chromosomes. Although I'd like it to be divided based on the chromosome. The first column reads 'chr1'....all the way down to 'chr23' for approximately 1300000 entries, so I want to divide the matrix into separate ones based on that feature. Something like de-concatenate...I'm just not sure how to do that as I import it, since I think it would be faster to combine the two steps. The file has no header rows, and is tab delimited. All other columns contain doubles.
I appreciate the advice!
Kevin

採用された回答

Matt J
Matt J 2013 年 7 月 2 日
You could read in the entire data set into a 1300000 x 23 matrix A using DLMREAD and then do
Acell=num2cell(A,1);
Then each Acell{i} will be a column of your data, available as it s own matrix.
  4 件のコメント
Kevin
Kevin 2013 年 7 月 3 日
Many thanks! unique is the trick there :)
Kevin
Kevin 2013 年 7 月 3 日
In this case I'm going to add the 'stable' flag to the setOrder parameter, in order to preserve the original ordering of my data.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by