added matlab
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
function eval_smooth(Ta)
|
||||
|
||||
fs = 10000;
|
||||
|
||||
b = 1;
|
||||
if (abs(Ta) > 0)
|
||||
b = 1/(abs(Ta)*fs);
|
||||
end;
|
||||
|
||||
a = 1 - b;
|
||||
|
||||
x = [ zeros(1, 1000) ones(1, 1000) zeros(1, 1000)];
|
||||
|
||||
y = 0;
|
||||
for i=1:length(x)
|
||||
if (Ta < 0)
|
||||
y = b*x(i) + a*y;
|
||||
yn(i) = y;
|
||||
end;
|
||||
|
||||
plot(yn); grid;
|
||||
Reference in New Issue
Block a user