Difference between revisions of "Nearest spin.m"
(Sync syntax/arguments/outputs with current Spinach source) |
(Restore pre-bulk-edit wiki content) |
||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:nearest_spin.m}} __NOTOC__ | {{DISPLAYTITLE:nearest_spin.m}} __NOTOC__ | ||
| − | |||
Returns the index of the nearest spin to the one specified. Only spins for which Cartesian coordinates are available are considered. | Returns the index of the nearest spin to the one specified. Only spins for which Cartesian coordinates are available are considered. | ||
==Syntax== | ==Syntax== | ||
| − | + | k=nearest_spin(spin_system,n) | |
==Arguments== | ==Arguments== | ||
| − | n - index of the spin in question | + | n - index of the spin in question |
==Outputs== | ==Outputs== | ||
| − | k - index of the nearest spin | + | k - index of the nearest spin |
| − | |||
| − | |||
| − | |||
| − | |||
==See also== | ==See also== | ||
| − | |||
[[Spin system specification]] | [[Spin system specification]] | ||
Revision as of 15:49, 5 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
Version 2.8, authors: Ilya Kuprov