Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet


Discussion Groups

Discussion Groups | Matlab DSP | Matlab for LMS (least mean squar)

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Matlab for LMS (least mean squar) - nasser alshuaili - Nov 19 10:57:00 2002




> Iam trying to write matlab script for LMS for first order system
and
> i got problm to complete the matlab scripts
> please could anyone help#
> ***********************************
> %assume y(k)=0.6(z^-1) u(k)/(1+0.5z^-1)
> %y(k)=-0.5y(k-1)+0.6u(k-1). >>>shifting>>  y(k+1)=-0.5y(k)+0.6u(k)
> %Note LMS w^(n+1)=w(n)+µ*u(n)*e(n).   0µ2/lamda  lamda=max
> eign
> value of R=u*u'
> % % To generate input signal
> u=idinput(1101);
>
> %To generate output
> for k =1
>     y(k)=0;
>     y(k+1)=-0.5*y(k)+0.6*u(k);
> end
> for k = 2:1100,
>     y(k+1)=-0.5*y(k)+0.6*u(k);
> end
> figure
> subplot(2,1,1);  plot(u);title ('Input signal');
> subplot(2,1,2);  plot(y);title ('Output signal');
> y=y(:);         %to get the transpose of matrix y
> % y% select portion from 100 to 1100 (number of coloums in u and y
> matrics=1000)
>
> u=u(101:1100);
> y=y(101:1100);
> z=[y,u];
> figure
>  plot(z);title ('Input/Output signal');
> *************************





(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )