sofacoustics / SOFAtoolbox

SOFA Toolbox (API for Matlab, Octave)
http://sofaconventions.org
European Union Public License 1.2
116 stars 31 forks source link

SOFAhrtf2dtf: rmfield invalid syntax #65

Closed germknoedlspeck closed 1 year ago

germknoedlspeck commented 1 year ago

in line 161 of SOFAhrtf2dtf:

ctf=rmfield(ctf,f); % remove
ctf.API.Dimensions=rmfield(ctf.API.Dimensions,f);

rmfield has the syntax to include field names in quotation marks. I always like to check for the existance of a field before rmfield, otherwise Matlab throws an unnecessary error.

germknoedlspeck commented 1 year ago

Apologies! f is a cell array containing more than a one-liner, so synthax is fine ;)

germknoedlspeck commented 1 year ago

reopened issue because SOFAhrtf2dtf.m throws an error when trying to remove a non-existing field

isfmiho commented 1 year ago

Fixed with pull request #71