# fieldscan_magn.m

From Spinach Documentation Wiki

Z magnetization of the sample in a finite-speed magnetic field sweep experiment.

## Syntax

[fields,z_magn]=fieldscan_magn(spin_system,parameters)

## Description

The function propagates the system in the time domain through a magnetic field sweep experiment. Z magnetisation is recorded and returned to the user.

## Arguments

parameters.fields - two-element vector in Tesla, ordered as [from to] parameters.npoints - number of points in the scan parameters.orientation - system orientation, three- element vector containing Euler angles in radians, ordered as [alp bet gam] parameters.sweep_time - sweep time, seconds parameters.nstates - (optional) number of lowest energy states to use for the effective Hamiltonian in the time domain

## Outputs

fields - magnetic fields in Tesla at each point in time z_magn - total sample magnetisation at each point in time

## Examples

See triple_dy_magn.m and quartet_magn.m files in examples/giant_spin directory.

## Notes

If the temperature is very low, it is likely that only a few lowest energy states would contribute to the time dynamics. If the simulation is slow, try setting parameters.nstates to some small number and increasing it until the answer stops changing.

## See also

eqmag.m, fieldscan_enlev.m, rapidscan.m, slowpass.m

*Version 2.1, authors: Ilya Kuprov, Elizaveta Suturina*