Home > vbmeg > demo > test_scripts > vb_set_current_V.m

vb_set_current_V

PURPOSE ^

Copyright (C) 2011, ATR All Rights Reserved.

SYNOPSIS ^

This is a script file.

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 %
0002 % Copyright (C) 2011, ATR All Rights Reserved.
0003 % License : New BSD License(see VBMEG_LICENSE.txt)
0004 
0005 rdir = [getenv('MATHOME') '/SBIdata-new/neuroimage_retino/data/'];
0006 
0007 brainfile = 'brain-retino2';
0008 pickfile  = 'meg-pick';
0009 
0010 load([rdir brainfile], 'V', 'xx');
0011 load([rdir pickfile], 'pick');
0012 
0013 Nsensor= size(pick,1);        % Number of pickup sensor
0014 
0015 rpick = 1.1;
0016 
0017 if ~isempty(Ndipole)
0018     V     = V(1:Ndipole,:);
0019     xx    = xx(1:Ndipole,:);
0020 end
0021 
0022 pick  = pick(:,1:3);
0023 pp    = sqrt(sum(pick.^2,2));
0024 pick  = pick./pp(:,ones(1,3));
0025 
0026 r     = sqrt(sum(V.^2,2));
0027 rmax  = max(r);
0028 R0    = rmax*rpick;
0029 
0030 pick  = pick*R0;
0031 
0032 V = R(1)*V;
0033 
0034 R = R*R0;
0035 
0036 %pickr = sqrt(sum(pick.^2,2));
0037 
0038 %plot(pickr);
0039 
0040 %hist(r,100);
0041 %plot3(pick(:,1),pick(:,2),pick(:,3),'.','Marker','o');
0042 %axis equal

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