Ts=1 e - 3;
Ts=n * Ts;
T=0: Ts: 20 * Ts;
X=sin (2 * PI * * 50 t) + 0.5 * sin (2 * PI * 150 * t);
The delta=0.4;
D (1 + length (t))=0.
For k=1: length (t)
E (k)=x (k) - D (k);
E_q (k)=delta * (2 * (e (k) & gt;=0) - 1);
D (k + 1)=e_q (k) + D (k);
Codeout (k)=(e_q (k) & gt; 0);
End
Subplot (3,1,1); The plot (t, x, '-o'); Axis ([0, 20 * Ts - 2, 2)); hold on;
Subplot (3,1,2); Stairs (t, codeout); Axis ([0, 20 * Ts - 2, 2));
Dr (1 + length (t))=0.
For k=1: length (t)
Eq (k)=delta * (2 * codeout (k) - 1);
Xr (k)=eq + Dr (k) (k);
Dr (k + 1)=xr (k);
End
Subplot (3,1,3); Stairs (t, xr); hold on;
Subplot (3,1,3); The plot (t, x);
Is no change in front of the sine of the signal, the content of the inside to the program to add some programs, or add the sampling time to change the slope out graphics, great god help ah, thank you,