title: How to change wavwrite and its parameters to audioread in MATLAB?
body: <p>I am working on Speaker Recognition System and trying to record a voice and save in database to recognize later. </p>
  
  <pre><code>disp('Recording stopped.');
  y1 = getaudiodata(micrecorder);
  y = getaudiodata(micrecorder, 'uint8');
  if size(y,2)==2
      y=y(:,1);
  end
  y = double(y);
  sound_number = sound_number+1;
  data{sound_number,1} = y;
  data{sound_number,2} = classe;
  data{sound_number,3} = 'Microphone';
  data{sound_number,4} = 'Microphone';
  st=strcat('u',num2str(sound_number));         %error here
  wavwrite(st,y1,samplingfrequency,samplingbits)%error here
  save('sound_database.dat','data','sound_number','-append');
  msgbox('Sound added to database','Database result','help');
  disp('Sound added to database');
  </code></pre>
  
  <p>But I am receiving this error:</p>
  
  <blockquote>
    <p>Undefined function or variable '<code>wavwrite</code>'.<br>
    Error in <code>voicerecognition</code> (line 66)<br>
    <code>wavwrite(y1,samplingfrequency,samplingbits,st)</code></p>
  </blockquote>
  
  <p>I tried to change to <code>audioread</code> but I don't know how to change its values.<br>
  Note: <code>st</code> is used to represent the filename.</p>