Home > vbmeg > functions > tool_box > dynamics_movie > test_fig > basic_tool > plot_ch_label.m

plot_ch_label

PURPOSE ^

SYNOPSIS ^

function plot_ch_label(parm,facefile,show_label,dx)

DESCRIPTION ^

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    plot_ch_label(parm,facefile,show_label,dx)
0002 %
0003 % Copyright (C) 2011, ATR All Rights Reserved.
0004 % License : New BSD License(see VBMEG_LICENSE.txt)
0005 
0006 load([facefile],'Vspm','xx')
0007 
0008 Rmax = 0.006;
0009 %dx = 0.003;
0010 
0011 % Find nearest point in face to get surface normal
0012 [indx, dd] = vb_find_nearest_point(Vspm, parm.src_pos , Rmax, 100, 1);
0013 sxx = dx * xx(indx,:);
0014 
0015 [indx, dd] = vb_find_nearest_point(Vspm, parm.det_pos , Rmax, 100, 1);
0016 dxx = dx * xx(indx,:);
0017 
0018 % Plot channel label
0019 for n=1:length(parm.source)
0020     ix = strmatch(parm.source{n}, show_label, 'exact');
0021     if ~isempty(ix)
0022         text(parm.src_pos(n,1)+sxx(n,1), parm.src_pos(n,2)+sxx(n,2),  ...
0023             parm.src_pos(n,3)+sxx(n,3), parm.source{n});
0024     end
0025 end
0026     
0027 for n=1:length(parm.detector)
0028     ix = strmatch(parm.detector{n}, show_label, 'exact');
0029     if ~isempty(ix)
0030         text(parm.det_pos(n,1)+dxx(n,1), parm.det_pos(n,2)+dxx(n,2),  ...
0031             parm.det_pos(n,3)+dxx(n,3), parm.detector{n});
0032     end
0033 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005