フィルターのクリア

how to filter a table by the dataset of another table

5 ビュー (過去 30 日間)
mor zarfati
mor zarfati 2015 年 5 月 3 日
回答済み: Peter Perkins 2015 年 5 月 5 日
I have 3 tables/one with names of genes that i want to learnabout their level of expression. a second table with the names of all the different genes(many that i dont need) and a third table that acourding to the same order of my second table(same value) shows the level of expression in different rats(rows of numbers). how do I make a new table with only the rows i need in the third table(of the list og genes in the first table)? thanks

回答 (2 件)

Image Analyst
Image Analyst 2015 年 5 月 3 日
What form do these tables have? Are they official "Table" class variables in MATLAB? Numbers in a regular double numerical array, or cell array? Data stored in a text file or Excel workbook?
Do you know how to make a logical vector to select rows:
rowsIWant = data(:, columnToLookAt) < someNumber;
extractedData = data(rowsIWant, :); % Extract rows meeting criteria.
  1 件のコメント
mor zarfati
mor zarfati 2015 年 5 月 5 日
編集済み: mor zarfati 2015 年 5 月 5 日
Im actually new to MATLAB so Im not familliare with tis code. i believe i am working with cell arrays(except for the third table -double)

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


Peter Perkins
Peter Perkins 2015 年 5 月 5 日
You probably need to give a concrete example of your data and your desired result, but in general terms, you can use the intersect function. This will work on strings, on doubles, and most particularly on tables, if by "I have 3 tables" you mean, "I have three variables whos class is 'table'".
Hope this helps.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by