Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Row selection from Cell contains 417 *11 elements

1 vue (au cours des 30 derniers jours)
Jes
Jes le 22 Juil 2015
Clôturé : MATLAB Answer Bot le 20 Août 2021
I have an excel file. I read using xlsread and the variable named alldata contains 417*11 in cell format. Here I want to select only 178 rows which depends on the first column of the cell contains 'OAS1_0001_MR1'
'OAS1_0002_MR1'
'OAS1_0003_MR1'
'OAS1_0004_MR1'
'OAS1_0005_MR1'
'OAS1_0006_MR1'
'OAS1_0007_MR1'
'OAS1_0009_MR1'
'OAS1_0010_MR1'
'OAS1_0011_MR1' etc.
Can anyone please help me to find a solution. Thanks in Advance.
  2 commentaires
Jan
Jan le 22 Juil 2015
The question is not clear: How do you decide which rows are wanted and which are not? What is the pattern?
Jes
Jes le 22 Juil 2015
Modifié(e) : Walter Roberson le 23 Juil 2015
I want to select the rows that contains
OAS1_0001,3,10,13,15,16,19,21:23,28,30:33,35,39,41,42,46,52,53,56,60,62,64:68,70,72,73,75,78,82:85,94,98,106,109,110,112:115,120,122:124,130,133:135,137:139,142,143,146,155,157,158,161,164:166,169,170,176,179,180,184:186,195,197,199:201,203,205,206,210,212,216,217,220,221,223,226,228,233,234,237,238,240,241,243,244,247,254:256,259,260,263,267:273,278:280,284,286:288,290:293,298:301,303,304,307,308,312,315:317,322,326,329,330,332,335,337:339,341:343,351,352,354:356,358,362,363,365,369,371,373,374,380,382,388,390,398,399,400,402,404,405,411,418,422:426,428,430,432,438,440,441,445:447,449,451:457

Réponses (1)

Walter Roberson
Walter Roberson le 23 Juil 2015
tf = ismember(DataFromExcel(:,1), 'OAS1_0001_MR1');
subset = DataFromExcel(tf,:);

Cette question est clôturée.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by