Closed henrikjacobsenfys closed 7 years ago
This is certanly a bug, I will investigate.
I checked the above code Matlab R2016b and R2017a using the latest version of SpinW from the master branch and I didn't get an error. The plot looks as expected:
Probably I fixed it sometime earlier. A little comment, if you use the latest unreleased version from GitHb, the
spinw.genmagstr()
changed an option name from unitS
to unit
.
Please comment on whether this fixed the problem.
Updating to the newest version fixed the problem. Thanks a lot :)
Hi Sandor
I am looking into have different anisotropies on different ions, but get an error message when I try to plot the structure. The error is this:
Error using bsxfun Non-singleton dimensions of the two input arrays must match each other.
Error in swplot.plotion (line 303) posc = bsxfun(@plus,posc,repmat(pos,[1 3]));
Error in spinw/plot (line 263) hFigure = plotFun{ii}(selArg{:});
Below is a small example creating this error. The code seems to run correctly apart from this; it creates a figure with anisotropy only on the correct ions.
Cheers,
Henrik