Tie selected variables to a common value
Posted: Wed Feb 17, 2016 4:26 am
This is relevant to the more general post "Tie several variables to a common value", but in this case I would like to fix together only some of the total variables (i.e. considering a not so symmetric system).
E.g., following up from the special case of the model described in "Fitting of magnetic susceptibility data", I would like to tie together two J values and let the third one evolve independently:
In that post I had successfully tied all three J's and g's together, but when the problem becomes less symmetrical I cannot simply invoke a
Is that possible to do?
Thanks in advance!
E.g., following up from the special case of the model described in "Fitting of magnetic susceptibility data", I would like to tie together two J values and let the third one evolve independently:
Code: Select all
cm=100*clight/1e6;
Ja = -20;
Jb = -22;
gxy = 2;
gz = 2;
Sys1.S=[5/2 5/2 5/2];
Sys1.g=[gxy gz; gxy gz; gxy gz];
Sys1.ee = -2*cm*[Ja Ja Jb];
fullSys.ee = [Sys1.ee; Sys1.ee; Sys1.ee];
declaration in my constrainJg external function to tie the J's together.Is that possible to do?
Thanks in advance!