[Pos] = PrintProtein(vector) PrintProtein: Prints the configuration encoded by vector INPUTS vector: Sequence of residues ( (H)ydrophobic or (P)olar, respectively represented by zero and one) OUTPUTS Pos: Position of the residues Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es)
0001 function[Pos] = PrintProtein(vector) 0002 % [Pos] = PrintProtein(vector) 0003 % PrintProtein: Prints the configuration encoded by vector 0004 % INPUTS 0005 % vector: Sequence of residues ( (H)ydrophobic or (P)olar, respectively represented by zero and one) 0006 % OUTPUTS 0007 % Pos: Position of the residues 0008 % 0009 % Last version 8/26/2008. Roberto Santana (roberto.santana@ehu.es) 0010 0011 0012 global HPInitConf; 0013 0014 [Collisions,Overlappings,Pos] = EvalChain(vector); 0015 0016 sizeChain = size(HPInitConf,2); 0017 0018 figure 0019 hold on 0020 for i=1:sizeChain 0021 if(HPInitConf(i) == 0) 0022 plot(Pos(i,1),Pos(i,2),'*'); 0023 else 0024 plot(Pos(i,1),Pos(i,2),'o'); 0025 end 0026 end 0027 plot(Pos(:,1),Pos(:,2),'b-'); 0028