Matlab code for GRAPE optimal control in NMR