IoSR-Surrey / MatlabToolbox

General purpose Matlab toolbox
MIT License
126 stars 43 forks source link

A bug for irStats.m as losing a 'n' #16

Open HualinR opened 12 months ago

HualinR commented 12 months ago

I found a bug in MatlabToolbox/+iosr/+acoustics/irStats.m row 276 trapz(x(max(1,t0(n)-correction):t0(n)+te).^2)/...

This code should be corrected by trapz(x(max(1,t0(n)-correction):t0(n)+te, n).^2)/...

Or the CTE results might be wrong when the input signal has more than 1 channel.