Wiener filter to estimate constant signal
You can use this code

 function w=WienerFIRFilter(input,desired,M) 
     auto_corr=xcorr(input,M,'unbiased');
     r=auto_corr(M+1:end); % positive lags only
     R=toeplitz(r); %correlation matrix
     cross_corr=xcorr(input,desired,M,'unbiased');
     p=(cross_corr(M+1:end));
     w=inv(R)*p'
 end