哪些操作使recursive least squares (RLS)算法的复杂度等于O(n ^ 2)以及为什么?
% Filter Parameters
p = 4; % filter order
lambda = 1.0; % forgetting factor
laminv = 1/lambda;
delta = 1.0; % initialization parameter
w = zeros(p,1); % filter coefficients
P = delta*eye(p); % inverse correlation matrix
e = x*0; % error signal
for m = p:length(x)
% Acquire chunk of data
y = n(m:-1:m-p+1);
% Error signal equation
e(m) = x(m)-w'*y;
Pi = P*y; % Parameters for efficiency
% Filter gain vector update
k = (Pi)/(lambda+y'*Pi);
P = (P - k*y'*P)*laminv; % Inverse correlation matrix update
w = w + k*e(m); % Filter coefficients adaption
end