If more than one nucleus has already been declared to Sys with isotropic/principle value notation, attempting to add a third with a full tensor fails as the function treats T0 in appendtensor as a single nucleus when applying fullifyA and fullifyQ
If nuclei already exist in Sys with nqi and an additional nucleus is added without a nqi, Sys.Q is not updated with zeros, as a result the number of rows in Sys.Q no longer corresponds to the number of nuclei.
This commit fixes three bugs in nucspinadd.m
error
Sys
with isotropic/principle value notation, attempting to add a third with a full tensor fails as the function treatsT0
inappendtensor
as a single nucleus when applyingfullifyA
andfullifyQ
Sys
with nqi and an additional nucleus is added without a nqi,Sys.Q
is not updated with zeros, as a result the number of rows inSys.Q
no longer corresponds to the number of nuclei.