Page 1 of 1

small pb with resfields documentation

Posted: Wed Feb 19, 2020 2:30 am
by harneit
I think there is a transpose (.') missing in the example given in resfields' documentation:
file:.../easyspin-5.2.28/documentation/resfields.html

(QUOTE with added line no.s)
1 First we compute the resonance fields for an axial spin system with two equivalent protons.
2 Sys = struct('S',.5,'g',[2.3,2.3,2],...
3 'Nucs','1H,1H','A',[10 10 500; 10 10 500]);
4 Param = struct('mwFreq',9.5,'Range',[200 400]);
5 [p,t] = sphgrid('Dinfh',201);
6 Param.CrystalOrientation = [p;t];
7 x = resfields(Sys,Param);
(END QUOTE)

This throws an "Error using p_crystalorientations; Exp.CrystalOrientation must be a Nx2 or Nx3 array, yours is 2x201."

Adding the transpose in line 6 like so:
Param.CrystalOrientation = [p;t].';
solved the issue.

Re: small pb with resfields documentation

Posted: Fri Feb 21, 2020 4:22 pm
by Stefan Stoll
Thanks for reporting this!