Difference between revisions of "Nearest spin.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Restore pre-bulk-edit wiki content)
(Normalise sequential blank lines)
Line 18: Line 18:
  
 
[[Kernel_utilities#Spin_system_editing|Spin system editing]]
 
[[Kernel_utilities#Spin_system_editing|Spin system editing]]
 
  
 
''Version 2.8, authors: [[Ilya Kuprov]]''
 
''Version 2.8, authors: [[Ilya Kuprov]]''

Revision as of 12:28, 25 April 2026

Returns the index of the nearest spin to the one specified. Only spins for which Cartesian coordinates are available are considered.

Syntax

    k=nearest_spin(spin_system,n)

Arguments

    n   - index of the spin in question

Outputs

    k   - index of the nearest spin

See also

Spin system specification

Spin system editing

Version 2.8, authors: Ilya Kuprov