上面那个是代码,不过跑起来之后报了矩阵维度的错误,错误信息如下:
Attempted to access index 2 of an array with smaller dimension sizes. The valid index range is 1 to 1. This error will stop the simulation.In MATLAB Function 'zhengchemoxing_EKF/MATLAB Function': P(:,:,i+1)=(eye(3)-K(:,:,i)*D_ekf)*P1(:,:,i);%更新协方差估计Component:MATLAB Function | Category:Runtime errorAn error occurred while running the simulation and the simulation was terminatedCaused by:
Simulation stopped because of a runtime error.
