How can I write on the lines that connects the vertices (edges) treeplot?
MATLAB code:
p(1)=0;
p(2)=1;p(3)=1;
p(6)=3;p(7)=3;
p(5)=2;p(4)=2;
p(10)=5;p(11)=5;
p(8)=4;p(9)=4;
p(16)=8;p(17)=9;
p(14)=7;p(15)=7;
p(20)=14;p(19)=14;
p(20)=15;p(19)=15;
%p.edgelable=0;
treeplot(p);
[x,y] = treelayout(p);
for i=1:length(y)
text(x(i),y(i),strcat('a',num2str(i)))
end
