davircarvalho / Individualized_HRTF_Synthesis

Synthesis of individualized HRTFs based on Neural Networks, Principal Component Analysis and anthropometry
GNU General Public License v3.0
62 stars 7 forks source link

Error in exporting in 48000 sample #1

Closed reter312 closed 2 years ago

reter312 commented 2 years ago

The 44100 works well but when i try to export hesuvi hrir in 48000 the app gives me this error:


Index in position 1 exceeds array bounds. Index must not exceed 4098.

Error in signal.internal.resample.uniformResample (line 126)
    yTmp2 = yTmp(indV,:);

Error in resample (line 198)
            signal.internal.resample.uniformResample(xIn, isDimValSet, Dim, dimIn, numericArgs{:});

Error in sofaResample>resample_this (line 57)
            IR(k, l, :) = resample(X(k,l,:), p, q, lpFilt);

Error in sofaResample (line 22)
    IR_upsample = resample_this(Obj.Data.IR, Fs_sofa, Fs_up);

Error in model_engine (line 93)
   Obj = sofaResample(Obj, Fs_out);

Error in eac_individualized_hrtf/StartButtonValueChanged (line 178)
                        model_engine(app.x1.Value, app.x3.Value,...

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 470)
Error while evaluating StateButton PrivateValueChangedFcn.
davircarvalho commented 2 years ago

What Matlab version are using? More recent versions (after r2019) require to explicitly use squeeze, which seems to be missing on line 57, such as: IR(k, l, :) = resample(squeeze(X(k,l,:)), p, q, lpFilt);.

However, I'll need to recompile the app, later today I'll take a look into this.

reter312 commented 2 years ago

What Matlab version are using? More recent versions (after r2019) require to explicitly use squeeze, which seems to be missing on line 57, such as: IR(k, l, :) = resample(squeeze(X(k,l,:)), p, q, lpFilt);.

However, I'll need to recompile the app, later today I'll take a look into this.

yea, i'm trying to find squeeze under the Toolboxes but i can't find anything related to, i also tried reinstalling Matlab but under product there's no Squeeze; i'm using the last version of Matlab 2021

davircarvalho commented 2 years ago

@reter312 I fixed this error and uploaded a new temporary installation file. But, I'm having an issue with my Matlab license and I wasn't able to verify if the app compiled correctly.

If you have a chance to confirm if it works, please let me know!

reter312 commented 2 years ago

@reter312 I fixed this error and uploaded a new temporary installation file. But, I'm having an issue with my Matlab license and I wasn't able to verify if the app compiled correctly.

If you have a chance to confirm if it works, please let me know!

yes, it works! thx mate!

I'm more or less convinced with the measures i made in the app, d5 and d8 are very hard to measure