sofacoustics / SOFAtoolbox

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

Failure during "SOFAsave" #32

Closed fewege closed 3 years ago

fewege commented 3 years ago

Hallo,

I have troubles creating a sofa-file and would appriciate help on this.

The problem: I have created an object with the function "SOFAconvertMIT2SOFA". Now I want to safe this object as a sofa-file using the function "SOFAsave". But everytime I try to do this I'm getting the following Error:

Dot indexing is not supported for variables of this type.

Error in SOFAsave (line 33) ObjCheck = SOFAgetConventions(Obj.GLOBAL_SOFAConventions,'m');

My code:

>> sofa=SOFAconvertMIT2SOFA('C:\Users\felix\Desktop\SOFA API for Matlab and Octave 1.1.3\HRTFs\MIT KEMAR','normal');
>> SOFAsave('C:\Users\felix\Desktop\SOFA API for Matlab and Octave 1.1.3\HRTFs\MIT KEMAR\sofa.sofa','sofa')
davircarvalho commented 3 years ago

Try without the quotation marks

such as SOFAsave('C:\Users\felix\Desktop\SOFA API for Matlab and Octave 1.1.3\HRTFs\MIT KEMAR\sofa.sofa', sofa)

fewege commented 3 years ago

Thanks that helped. But now I get the next error. @davircarvalho Can you help me with that one too?

Warning: GLOBAL_DateCreated is read-only and was reset to 2021-08-31 15:03:36

In SOFAsave (line 52) Operator '~=' is not supported for operands of type 'struct'.

Error in SOFAsave (line 56) if Obj.(varNames{ii}) ~= ObjCheck.(varNames{ii})

davircarvalho commented 3 years ago

I'm not sure how to solve that, but here you can find the files already converted to .sofa.