📄 toaa_toa_ls.m
字号:
function T=A_TOA_LS(S)
%
% T=A_TOA_LS(S)
%
% Function gives back the coordinates of the transmitter computed
% by the using the least square method.
%
% S - the input matrix, where the coordinates of the receiver and its
% distance from the transmitter are in every row.
% The size of the matrix S is (number of receivers)*4.
%
% T - the coordinates of the calculated transmitter
% na vstupe matica rozmerov n*4
[rows,columns]=size(S);
A=zeros(rows-1,3);
b=zeros(rows-1,1);
for i=1:(rows-1)
A(i,:)=[S(i+1,1)-S(1,1),S(i+1,2)-S(1,2),S(i+1,3)-S(1,3)];
b(i)=0.5*[S(1,4)^2-S(i+1,4)^2-S(1,1)^2-S(1,2)^2-S(1,3)^2+S(i+1,1)^2+S(i+1,2)^2+S(i+1,3)^2];
end
T=(pinv(A)*b)';
%% Date: 03.04.2007
%% Author: Maria Riskova
%
% T=A_TOA_LS(S)
%
% Function gives back the coordinates of the transmitter computed
% by the using the least square method.
%
% S - the input matrix, where the coordinates of the receiver and its
% distance from the transmitter are in every row.
% The size of the matrix S is (number of receivers)*4.
%
% T - the coordinates of the calculated transmitter
% na vstupe matica rozmerov n*4
%
% T=A_TOA_LS(S)
%
% Function gives back the coordinates of the transmitter computed
% by the using the least square method.
%
% S - the input matrix, where the coordinates of the receiver and its
% distance from the transmitter are in every row.
% The size of the matrix S is (number of receivers)*4.
%
% T - the coordinates of the calculated transmitter
% na vstupe matica rozmerov n*4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -