title: amplification of audio signal
body: <p>I'm trying to write a program that takes two audio files and matches one to the other as best it can. So if I were to give the program two audio files, one of which is just a quieter version of the other one the program should amplify the quieter one to match the other. What functions could I used to achieve what I am looking for? i have used following code lines but it balances both signals but cutting the louder signal. i want the quieter to be equal to louder one</p>
  <pre><code>% creation of signals
   N=1024;
   n=0:N-1;
   x=sin(2*pi*(2^-7).*n);
   y=2*sin(2*pi*(2^-7).*n+pi/4);
   
   % justify its power 
   x1=x/sqrt(mean(x.^2));
   y1=y/sqrt(mean(y.^2));
  </code></pre>