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?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 4 de En. de 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
Respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!