@@ -689,8 +689,8 @@ function correct_estimate!(estim::UnscentedKalmanFilter, y0m, d0)
689689 γ_sqrtP̂ = lmul! (γ, sqrtP̂)
690690 X̂0, Ŷ0m = estim. X̂0, estim. Ŷ0m
691691 X̂0 .= x̂0
692- X̂0[:, 2 : nx̂+ 1 ] .+ = γ_sqrtP̂
693- X̂0[:, nx̂+ 2 : end ] .- = γ_sqrtP̂
692+ X̂0[:, 2 : nx̂+ 1 ] .= @views X̂0[:, 2 : nx̂ + 1 ] .+ γ_sqrtP̂
693+ X̂0[:, nx̂+ 2 : end ] .= @views X̂0[:, nx̂ + 2 : end ] .- γ_sqrtP̂
694694 ŷ0 = estim. buffer. ŷ
695695 for j in axes (Ŷ0m, 2 )
696696 @views ĥ! (ŷ0, estim, estim. model, X̂0[:, j], d0)
@@ -784,8 +784,8 @@ function update_estimate!(estim::UnscentedKalmanFilter, y0m, d0, u0)
784784 sqrtP̂corr = P̂corr_chol. L
785785 γ_sqrtP̂corr = lmul! (γ, sqrtP̂corr)
786786 X̂0corr .= x̂0corr
787- X̂0corr[:, 2 : nx̂+ 1 ] .+ = γ_sqrtP̂corr
788- X̂0corr[:, nx̂+ 2 : end ] .- = γ_sqrtP̂corr
787+ X̂0corr[:, 2 : nx̂+ 1 ] .= @views X̂0corr[:, 2 : nx̂ + 1 ] .+ γ_sqrtP̂corr
788+ X̂0corr[:, nx̂+ 2 : end ] .= @views X̂0corr[:, nx̂ + 2 : end ] .- γ_sqrtP̂corr
789789 X̂0next = X̂0corr
790790 for j in axes (X̂0next, 2 )
791791 @views x̂0corr .= X̂0corr[:, j]
0 commit comments