function ga=xcorr(x,opt)

c = convol(x,x($:-1:1));
N=length(x);

if opt=='biased' then,
ga=(1/N).*c;

elseif  opt=='unbiased' then,
vect=ones([N:-1:1])./[N:-1:1];
vect=[vect($:-1:2),vect];
ga=vect.*c;
end

endfunction
