Home > SurfStat > SurfStatDataCursor.m

SurfStatDataCursor

PURPOSE ^

SYNOPSIS ^

function txt=SurfStatDataCursor(empt,event_obj)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function txt=SurfStatDataCursor(empt,event_obj)
0002 pos=get(event_obj,'Position');
0003 h=get(event_obj,'Target');
0004 v=get(h,'Vertices');
0005 x=get(h,'FaceVertexCData');
0006 id1=min(find(v(:,1)==pos(1)&v(:,2)==pos(2)&v(:,3)==pos(3)));
0007 tag=get(get(h,'Parent'),'Tag');
0008 [s,a,id0]=strread(tag,'%s %d %d');
0009 id=id1+id0
0010 txt = {['x: ',num2str(pos(1))],...
0011        ['y: ',num2str(pos(2))],...
0012        ['z: ',num2str(pos(3))],...
0013        ['id: ',num2str(id)],...
0014        ['value: ',num2str(x(id1))]};
0015 return
0016 end
0017

Generated on Fri 26-Sep-2008 14:05:29 by m2html © 2003