Manipulating matrix in particular columns
이전 댓글 표시
I have variables
final_result = {
'Genes' 'T0&T2' 'T1&T3' 'T2&T4' 'T3&T5' 'T4&T6'
'YAR029W' 'dd' 'uu' 'dd' 'uu' 'du'
'YBL095W' 'du' 'ud' 'ud' 'du' 'du'
'YBL111C' 'uu' 'uu' 'ud' 'ud' 'du'
'YBL113C' 'uu' 'uu' 'uu' 'ud' 'ud'
'YBR096W' 'uu' 'uu' 'ud' 'ud' 'dd'
'YBR138C' 'ud' 'ud' 'ud' 'du' 'du' }
final =
'YAR029W' 'd' [] 'd' [] 'd'
'YBL095W' 'd' [] [] 'd' 'd'
'YBL111C' 'u' 'u' 'u' 'u' []
'YBL113C' 'u' 'u' 'u' 'u' 'u'
'YBR096W' 'u' 'u' 'u' 'u' []
'YBR138C' 'd' [] [] 'd' 'd'
I need to fetch only the corresponding column from final_result with respect from final [] must be omitted
I need output as
final1=
'Genes' 'T0&T2' 'T2&T4' 'T4&T6'
'YAR029W' 'dd' 'dd' 'du'
'YBL095W' 'du' 'ud' 'du'
'YBL111C' 'uu' 'ud' 'du'
'YBL113C' 'uu' 'uu' 'ud'
'YBR096W' 'uu' 'ud' 'dd'
'YBR138C' 'ud' 'ud' 'du'
final2=
'Genes' 'T0&T2' 'T3&T5' 'T4&T6'
'YBL095W' 'du' 'du' 'du'
'YBL111C' 'uu' 'ud' 'du'
'YBL113C' 'uu' 'ud' 'ud'
'YBR096W' 'uu' 'ud' 'dd'
'YBR138C' 'ud' 'du' 'du'
; ; ; final5
'Genes' 'T0&T2' 'T1&T3' 'T2&T4' 'T3&T5'
'YBR096W' 'uu' 'uu' 'ud' 'ud'
'YBR138C' 'ud' 'ud' 'ud' 'du'
please help
댓글 수: 1
per isakson
2012년 7월 24일
편집: per isakson
2012년 7월 24일
Put a bit more effort into the description of the problem! Remember you asking us to work for free for you.
The process of formulating the problem might help you find the solution.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Sparse Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!