small pb with resfields documentation

A place to report and discuss potential bugs
Post Reply
harneit
Newbie
Posts: 1
Joined: Wed Feb 19, 2020 2:18 am

small pb with resfields documentation

Post 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.
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: small pb with resfields documentation

Post by Stefan Stoll »

Thanks for reporting this!
Post Reply