Fixed another error in GL derivative

This commit is contained in:
Joakim Skogholt 2023-05-20 08:36:15 +02:00
parent c2e265b407
commit 1c71badbef

View file

@ -76,7 +76,7 @@ elseif regType == "GL" # Grünwald-Letnikov fractional derivative regulariztion
# regParam1 is alpha (order of fractional derivative)
C = ones(p)*1.0;
for k in 2:p
C[k] = (-1)^(k-1) * (1-(regParam1+1)/k) * C[k-1];
C[k] = (1-(regParam1+1)/(k-1)) * C[k-1];
end
regMat = zeros(p,p);