Comparing and Combining the Values

조회 수: 7 (최근 30일)
Pat
Pat 2012년 7월 17일
I have edited the question,where i made a smallmistake in gene 4 combination
i have a set of values
Gene T0 T1 T2 T3,,,,,,,,,T8
'gene1' 'u' 'u' 'd' 'd',,,,,,,,'u'
'gene2' 'u' 'u' 'u' 'u',,,,,,,,'u'
'gene3' 'd' 'u' 'u' 'd',,,,,,,,'u'
'gene4' 'd' 'u' 'd' 'u',,,,,,,,'d'
I want to combine these values such that i need to combine T0&T2,T2&T4,T4&T6,T6&T8,Gene&T0 such that i get output as T0&T2 T6&T8
(gene1,u) (u,d),,,,,,,,,(d,d)
'
'
(gene4,d) (d,d),,,,,,,,,(u,d)
same for gene&T1,T1&T3,T3&T5,T5&T7
  댓글 수: 2
Miro
Miro 2012년 7월 17일
i think you have to be a bit more specific.
I dont get the part where u state T0&T2 for (gene4,d) gives (u,d).
Jan
Jan 2012년 7월 18일
Pat, this is your 161th question in this forum. I still do not see that you care for the clarity of your questions. Please read and consider again: Answers: How to ask a good question.

댓글을 달려면 로그인하십시오.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 7월 18일
D2 = data(:,[1,2:2:end]);
[m,n]=size(D2);
out = mat2cell(D2(:,[1,reshape(repmat(2:n-1,2,1),1,[]),end]),ones(m,1),2*ones(1,2+(m-2)/2));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Bioinformatics Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by