I get Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND = NaN. What does this mean? and how can I fix it?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I don't understand what is going wrong with my code!! I would copy the code but it is very long! However, I get this error in the fourth line of the code below.
% Extended Kalman Filter
% EKF Cycle
Pstar=A*P*A'+F*Q*F';
% Estimate the state
[~,xest]=ode45('PlantModel',[t(k),t(k+1)],x(k,:)); % Estimation of states
x(k+1,:)=xest(end,:); % Assign a variable to the estimated states
% Correction
L=inv((C*Pstar*C'+R))*C*Pstar; % Update the value of the observer
P=(eye(3)-L'*C)*Pstar; % Update the Estimation Error
x(k+1,:)=(eye(3)-L'*C)*x(k+1,:)'+L'*y(k+1,:)'; % Update the States
3 Kommentare
Walter Roberson
am 4 Jan. 2017
I would extend this and say that you are probably trying to take the inverse of an all-zero matrix or perhaps an empty matrix
Antworten (0)
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!