It is nuclear magnetic resonance simulation in classics mechanics approximation.
Red arrow is J vector, rotational momentum
Blue arrow is vector B, magnetic field.
It is solution of equation dJ/dt=gamma*[JxB] Where B is constant magnetic filed + small perpendicular harmonic magnetic field with frequency equal to Larmor precession frequency. That is why resonance take place: length of red vector J increase all time.
Run test_res.m to start animation.
Video on youtube:
Maxim Vedenyov (2023). Nuclear magnetic resonance simulation (https://www.mathworks.com/matlabcentral/fileexchange/41295-nuclear-magnetic-resonance-simulation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!