Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Row selection from Cell contains 417 *11 elements

1 回表示 (過去 30 日間)
Jes
Jes 2015 年 7 月 22 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Jan
Jan 2015 年 7 月 22 日
The question is not clear: How do you decide which rows are wanted and which are not? What is the pattern?
Jes
Jes 2015 年 7 月 22 日
編集済み: Walter Roberson 2015 年 7 月 23 日
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

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 7 月 23 日
tf = ismember(DataFromExcel(:,1), 'OAS1_0001_MR1');
subset = DataFromExcel(tf,:);

この質問は閉じられています。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by