I use some of the features, primarily "SOFAplotHRTF" in the latest Octave 6.3 and there is an issue to get (Obj.SourcePosition_Type,'cartesian') support code to work.
The fix I use is replacing lines 131 and 132 from:
Obj.SourcePosition(ii,1)=rad2deg(Obj.SourcePosition(ii,1));Obj.SourcePosition(ii,1)=npi2pi(Obj.SourcePosition(ii,1),'degrees'); % requires Mapping toolbox in Matlab
to
Obj.SourcePosition(ii,1)=npi2pi(Obj.SourcePosition(ii,1)); % https://github.com/alfoltranteam/octave-map/blob/master/src/npi2pi.mObj.SourcePosition(ii,1)=rad2deg(Obj.SourcePosition(ii,1));
npi2pi.m function may require Mapping toolbox, but there is an open source alternative from https://github.com/alfoltranteam/octave-map/blob/master/src/npi2pi.m which does not support 'degrees' mode. With this simple change the code should work both in Matlab and Octave irrespective of the Mapping toolbox.
Dear Sergejs, thank you for pointing this out. I removed the usage of npi2pi completely, so we do not depend on an extra toolbox, extra documents, or outdated functions.
Hello,
I use some of the features, primarily "SOFAplotHRTF" in the latest Octave 6.3 and there is an issue to get
(Obj.SourcePosition_Type,'cartesian')
support code to work.The fix I use is replacing lines 131 and 132 from:
Obj.SourcePosition(ii,1)=rad2deg(Obj.SourcePosition(ii,1));
Obj.SourcePosition(ii,1)=npi2pi(Obj.SourcePosition(ii,1),'degrees'); % requires Mapping toolbox in Matlab
toObj.SourcePosition(ii,1)=npi2pi(Obj.SourcePosition(ii,1)); % https://github.com/alfoltranteam/octave-map/blob/master/src/npi2pi.m
Obj.SourcePosition(ii,1)=rad2deg(Obj.SourcePosition(ii,1));
npi2pi.m function may require Mapping toolbox, but there is an open source alternative from https://github.com/alfoltranteam/octave-map/blob/master/src/npi2pi.m which does not support 'degrees' mode. With this simple change the code should work both in Matlab and Octave irrespective of the Mapping toolbox.
Best Regrds, Sergejs