From cf136186f5c9d82eccec7c3e0fd04000204b4a63 Mon Sep 17 00:00:00 2001 From: "turajs@google.com" Date: Fri, 23 Sep 2011 21:49:25 +0000 Subject: [PATCH] Deleting matlab files git-svn-id: http://webrtc.googlecode.com/svn/trunk@647 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../agc/main/matlab/getGains.m | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/modules/audio_processing/agc/main/matlab/getGains.m diff --git a/src/modules/audio_processing/agc/main/matlab/getGains.m b/src/modules/audio_processing/agc/main/matlab/getGains.m deleted file mode 100644 index e0234b8593..0000000000 --- a/src/modules/audio_processing/agc/main/matlab/getGains.m +++ /dev/null @@ -1,32 +0,0 @@ -% Outputs a file for testing purposes. -% -% Adjust the following parameters to suit. Their purpose becomes more clear on -% viewing the gain plots. -% MaxGain: Max gain in dB -% MinGain: Min gain at overload (0 dBov) in dB -% CompRatio: Compression ratio, essentially determines the slope of the gain -% function between the max and min gains -% Knee: The smoothness of the transition to max gain (smaller is smoother) -MaxGain = 5; MinGain = 0; CompRatio = 3; Knee = 1; - -% Compute gains -zeros = 0:31; lvl = 2.^(1-zeros); -A = -10*log10(lvl) * (CompRatio - 1) / CompRatio; -B = MaxGain - MinGain; -gains = round(2^16*10.^(0.05 * (MinGain + B * ( log(exp(-Knee*A)+exp(-Knee*B)) - log(1+exp(-Knee*B)) ) / log(1/(1+exp(Knee*B)))))); -fprintf(1, '\t%i, %i, %i, %i,\n', gains); - -% Save gains to file -fid = fopen('gains', 'wb'); -if fid == -1 - error(sprintf('Unable to open file %s', filename)); - return -end -fwrite(fid, gains, 'int32'); -fclose(fid); - -% Plotting -in = 10*log10(lvl); out = 20*log10(gains/65536); -subplot(121); plot(in, out); axis([-60, 0, -5, 30]); grid on; xlabel('Input (dB)'); ylabel('Gain (dB)'); -subplot(122); plot(in, in+out); axis([-60, 0, -60, 10]); grid on; xlabel('Input (dB)'); ylabel('Output (dB)'); -zoom on;