Skip to content
Snippets Groups Projects
Commit 5cab2e68 authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

fix bug in arx regressor

parent 7ec0c569
No related branches found
No related tags found
1 merge request!3Julia1
Pipeline #682 failed
...@@ -52,7 +52,7 @@ function getARXregressor(y::AbstractVector,u::AbstractVecOrMat, na, nb) ...@@ -52,7 +52,7 @@ function getARXregressor(y::AbstractVector,u::AbstractVecOrMat, na, nb)
y = copy(A[:,1]) y = copy(A[:,1])
A = A[:,2:end] A = A[:,2:end]
for i = 1:length(nb) for i = 1:length(nb)
offs = m-nb[i] offs = m-nb[i]-1
A = [A toeplitz(u[nb[i]+offs:n+nb[i]+offs-1,i],u[nb[i]+offs:-1:1+offs,i])] A = [A toeplitz(u[nb[i]+offs:n+nb[i]+offs-1,i],u[nb[i]+offs:-1:1+offs,i])]
end end
return y,A return y,A
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment