Краткий ответ, используйте функцию text
.
Посмотрите, с чего вы начали:
%A couple of random points in 3 space
xyz1 = randn(3,1);
xyz2 = randn(3,1);
%Set up a figure, and create "arrow" plots within
figure(3781);
clf;
hold on
quiver3(0,0,0,xyz1(1), xyz1(2), xyz1(3),0,'b')
quiver3(0,0,0,xyz2(1), xyz2(2), xyz2(3),0,'r')
view(3)
%Add a line connecting teh arrows, and a text label
plot3([xyz1(1) xyz2(1)], [xyz1(2) xyz2(2)], [xyz1(3) xyz2(3)],'k:')
xyzCenter = mean([xyz1 xyz2],2);
h = text(xyzCenter(1), xyzCenter(2), xyzCenter(3), 'Label text here');
set(h,'Color','b')
get(h); %For more properties to set