i am using minspantree function of matlab.i need to convert tree output of this function to an array.output tree looks like as (1.2) 1....(3,4) 1....(5,8) 1...first digit in parentheis indicates destination node and second digit is source

 Respuesta aceptada

Did I understand you correctly that you want to have a "normal" matrix rather than a sparse matrix?
If this is the case you can use the MATLAB command FULL:
cm = [0 1 1 0 0;1 0 0 1 1;1 0 0 0 0;0 0 0 0 1;1 0 1 0 0];
bg1 = biograph(cm)
[Tree, pred] = minspantree(bg1)
Tree_full = full(Tree)

Más respuestas (0)

Categorías

Más información sobre Bioinformatics Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 3 de Jun. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by