This commit is contained in:
2023-11-14 17:10:27 +08:00
commit d5a822831c
423 changed files with 5909 additions and 0 deletions

18
FOTF Toolbox/dfod2.m Normal file
View File

@ -0,0 +1,18 @@
function H=dfod2(n,T,r)
% DFOD2 - discrete implementation of s^r
%
% H=dfod2(n,T,r)
%
% n - filter order
% T - sample time
% r - fractional order
% modified directly from Petras function, under the same name
arguments
n(1,1) {mustBePositiveInteger}
T(1,1) {mustBePositive}, r(1,1) double
end
if r>0
bc=cumprod([1,1-((r+1)./[1:n])]); H=filt(bc,T^r,T);
elseif r<0
bc=cumprod([1,1-((-r+1)./[1:n])]); H=filt(T^(-r),bc,T);
end, end