wavread error in vibrato function matlab
<p>I am trying to compile a Vibrato sound effect code that I found on the internet. The code has a function call <code>wavread</code>, in this function matlab is showing error, I've search another codes to do this and every code use this function to open de wav file, someone what is happening? The code below:</p>

<p>Vibrato Script:</p>

<pre><code>clear all;
close all;
clc;

infile = 'musica.wav';

% read in wav sample
[ x, Fs, N ] = wavread(infile);


%set Parameters for vibrato
% Change these to experiment with vibrato

Modfreq = 10; %10 Khz
Width = 0.0008; % 0.8 Milliseconds

% Do vibrato

yvib = vibrato(x, Fs, Modfreq, Width);

% write output wav files
wavwrite(yvib, Fs,  'out_vibrato.wav');

% plot the original and equalised waveforms

figure(1)
hold on
plot(x(1:500),'r');
plot(yvib(1:500),'b');
title('Vibrato First 500 Samples');
</code></pre>

<p>Vibrato Function:</p>

<pre><code>% Vibrato 
function y=vibrato(x,SAMPLERATE,Modfreq,Width)
ya_alt=0;
Delay=Width; % basic delay of input sample in sec
DELAY=round(Delay*SAMPLERATE); % basic delay in # samples
WIDTH=round(Width*SAMPLERATE); % modulation width in # samples
if WIDTH&gt;DELAY 
  error('delay greater than basic delay !!!');
  return;
end
MODFREQ=Modfreq/SAMPLERATE; % modulation frequency in # samples
LEN=length(x);        % # of samples in WAV-file
L=2+DELAY+WIDTH*2;    % length of the entire delay  
Delayline=zeros(L,1); % memory allocation for delay
y=zeros(size(x));     % memory allocation for output vector

for n=1:(LEN-1)
   M=MODFREQ;
   MOD=sin(M*2*pi*n);
   ZEIGER=1+DELAY+WIDTH*MOD;
   i=floor(ZEIGER);
   frac=ZEIGER-i;
   Delayline=[x(n);Delayline(1:L-1)]; 
   %---Linear Interpolation-----------------------------
   y(n,1)=Delayline(i+1)*frac+Delayline(i)*(1-frac); 

   %---Allpass Interpolation------------------------------
   %y(n,1)=(Delayline(i+1)+(1-frac)*Delayline(i)-(1-frac)*ya_alt);  
   %ya_alt=ya(n,1);
end 
</code></pre>

<p>The error that appears:</p>

<p><code>Undefined function or variable 'wavread'</code>.</p>

<p>In the line:</p>

<pre><code>[ x, Fs, N ] = wavread(infile);
</code></pre>