Manipulating matrix in particular columns
Afficher commentaires plus anciens
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 commentaire
per isakson
le 24 Juil 2012
Modifié(e) : per isakson
le 24 Juil 2012
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Sparse Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!