Difference between revisions of "Centroid.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Add NOTOC to Spinach function page header)
m (Rename Arguments section heading to Parameters)
Line 6: Line 6:
 
     [x,y,z]=centroid(probden,ranges)
 
     [x,y,z]=centroid(probden,ranges)
  
−
==Arguments==
+
==Parameters==
  
 
     probden  - probability density cube with dimensions
 
     probden  - probability density cube with dimensions

Revision as of 17:47, 5 June 2026

Finds the centre of mass point of a 3D probability density in a cube.

Syntax

    [x,y,z]=centroid(probden,ranges)

Parameters

    probden  - probability density cube with dimensions
               ordered as [X Y Z]

    ranges   - six-element vector giving axis extents
               as [xmin xmax ymin ymax zmin zmax]

Outputs

    [x,y,z]  - centre of mass coordinates

See also

probmax.m, volplot.m, kpcs.m, ipcs.m

Version 2.1, authors: Ilya Kuprov