Home > vbmeg > functions > leadfield > spherical_harmo > vb_average_radius.m

vb_average_radius

PURPOSE ^

return average distance between center point and satellites

SYNOPSIS ^

function R_ave = vb_average_radius(center, satellites)

DESCRIPTION ^

 return average distance between center point and satellites
 [usage]
   R_ave = vb_average_radius( center, satellites )
 [input]
       center : coordinate of center point (1 x 3)
   satellites : points like coordinates of sensors (NP x 3)
 [output]
   R_ave : calculated average distance
 [note]
 
 [history]
   2006.07.12 (Sako) initial version


 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 R_ave = vb_average_radius(center, satellites)
0002 % return average distance between center point and satellites
0003 % [usage]
0004 %   R_ave = vb_average_radius( center, satellites )
0005 % [input]
0006 %       center : coordinate of center point (1 x 3)
0007 %   satellites : points like coordinates of sensors (NP x 3)
0008 % [output]
0009 %   R_ave : calculated average distance
0010 % [note]
0011 %
0012 % [history]
0013 %   2006.07.12 (Sako) initial version
0014 %
0015 %
0016 % Copyright (C) 2011, ATR All Rights Reserved.
0017 % License : New BSD License(see VBMEG_LICENSE.txt)
0018 
0019 NP = size(satellites,1);
0020 c_rep = repmat(center, NP,1);
0021 R_ave = sum(sqrt(sum(((satellites - c_rep) .^ 2),2))) ./ NP;
0022 
0023 return;

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