最小二乘拟合三个方程求助 (已解答)
卡尔曼滤波理论与实践MATLAB版 第4版的课后习题 第一章
第一题
matlab 代码实现
%%exercises 1
A=[1,1;3,1;2,1] ;
Z=[2;4;1];
%B=(A'*A)-1;
B1=inv(A'*A);
%C=B*A';
%D=C*Z;
E=A'*Z;
F=B1*E;
disp('The answer of exercises one is');
disp(F);
答案:
The answer of exercises one is
1.0000
0.3333
第二题
clc;
clear;
close all;
A=[1,1;3,1;2,1;4,1];
Z=[2;4;1;4];
B1=inv(A'*A);
E=A'*Z;
F=B1*E;
disp('The answer of exercises two is');
disp(F);
答案:
The answer of exercises two is
0.9000
0.5000