blob: 920933871366da2395ef8a657a2b05eab36e905b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//clear//
//Example7.2:Digital Differentiator
syms t n;
T = 0.1; //Sampling time in seconds
xct = sin(%pi*t/T)/(%pi*t);
yct = diff(xct,t);
disp(yct,'yc(t)=');
t = n*T;
xdn = sin(%pi*t/T)/(%pi*t);
ydn = diff(xdn,n);
disp(ydn,'yd[n]=');
hdn = T*ydn;
disp(hdn,'hd[n]=');
//Result
//yc(t) = (10*cos(31.415927*t)/t)-(0.3183099*sin(31.415927*t)/(t^2))
//yd[n]=(10*cos(3.1415927*n)/n)-3.183*sin(3.1415927*n)/(n^2)
//hd[n]=(cos(3.1415927*n)/n)-0.3183*sin(3.1415927*n)/(n^2)
|