Home > wafo > kdetools > vsph.m

vsph

PURPOSE ^

calculates volume of d-dimensional sphere with radius r0

SYNOPSIS ^

c=vsph(d,r0)

DESCRIPTION ^

  VSPH calculates volume of  d-dimensional sphere with radius r0 
  
  CALL: vd = vsph(d,r0) 
  
   d  = dimension of sphere 
   r0 = radius of sphere (default 1)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

01 function c=vsph(d,r0) 
02 % VSPH calculates volume of  d-dimensional sphere with radius r0 
03 % 
04 % CALL: vd = vsph(d,r0) 
05 % 
06 %  d  = dimension of sphere 
07 %  r0 = radius of sphere (default 1) 
08 %  
09  
10 % Reference 
11 %  Wand,M.P. and Jones, M.C. (1995) 
12 % 'Kernel smoothing' 
13 %  Chapman and Hall, pp 105 
14  
15 % History    
16 % revised pab dec2003 
17 % -removed some code   
18 % By pab 199?   
19    
20    
21 if nargin<2 | isempty(r0) 
22  r0=1; % default unit sphere 
23 end 
24 c=(r0^d)* 2*pi^(d/2)/(d*gamma(d/2)); % Wand and Jones pp 105 
25 return 
26

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003