You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to convert 10 impulse responses into a single SOFA format data. I stored the data of the impulse responses in the field named hrtfData.Data.IR with dimensions MNR (where M is the number of measurements, N is the length of each impulse response, and R is the number of microphones).
When I executed SOFASave, I encountered the following error. Upon inspecting the data in hrtfData.API.Dimensions.Data.IR, it appeared to be cell-type data with the string 'mRn'. Even after updating it to hrtfData.API.Dimensions.Data.IR {1} = 'MNR' to match the dimensions of MNR, the error persists. Can you please provide guidance on the correct method for verifying and correcting the dimensions?
CODE:
M = 10;
N = 4800;
R = 2;
hrir_matrix = zeros(M, N, R);
%...Manipulation of inserting impulse response data into hrir_matrix for hrtfData.Data.IR...
sourcePosition = zeros(M, 3); # ex: [azimuth(deg), elavation(deg), radius(m)]
%...Manipulation of sourcePosition for hrtfData.SourcePosition...
% Create SOFA structure
hrtfData = SOFAgetConventions('SimpleFreeFieldHRIR');
%Configuration for hrtfData
hrtfData.API.M = M;
hrtfData.API.N = N;
% hrtfData.API.Dimensions.Data.IR{1} = 'MRN';
hrtfData.Data.SamplingRate = 48000;
hrtfData.Data.IR = hrir_matrix;
hrtfData.ListenerPosition = [0, 0, 0]; %
hrtfData.SourcePosition = sourcePosition;
hrtfData.GLOBAL_History = 'converted by Rei';
% Save SOFAfile
SOFAsave('converted_measured_hrirs.sofa', hrtfData);
Error Message:
Error: SOFAupdateDimensions (line 125)
Data.IR: dimension could not be matched.
Error: SOFAsave (line 60)
Obj=SOFAupdateDimensions(Obj);
Error: main (line 168)
SOFAsave('converted_measured_hrirs.sofa', hrtfData);
The text was updated successfully, but these errors were encountered:
I am trying to convert 10 impulse responses into a single SOFA format data. I stored the data of the impulse responses in the field named
hrtfData.Data.IR
with dimensions MNR (where M is the number of measurements, N is the length of each impulse response, and R is the number of microphones).When I executed
SOFASave
, I encountered the following error. Upon inspecting the data inhrtfData.API.Dimensions.Data.IR
, it appeared to be cell-type data with the string 'mRn'. Even after updating it tohrtfData.API.Dimensions.Data.IR {1} = 'MNR'
to match the dimensions of MNR, the error persists. Can you please provide guidance on the correct method for verifying and correcting the dimensions?CODE:
The text was updated successfully, but these errors were encountered: