Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Discussion Groups

Discussion Groups | Matlab DSP | System of equations in Matlab - difficulty - TDOA

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

System of equations in Matlab - difficulty - TDOA - hr21...@bath.ac.uk - Jul 2 14:56:30 2008



I am trying to solve a system of equations, there are
three unknowns (x,y,z) outputed at the end of the code
as solX, SolY and solD.. for some reason, I keep getting
incorrect answers..
I am getting:
solX = 1.113114389722870e+002
SolY = 62.620043782546148
solD = -1.243181061282195e+002

where X should be ~ 0.2 and y~0.25
so I am not sure whats going wrong..
------------------------------------------------------

format long
%%%coordinates of receivers
X=[50.02 100.02 0.03  50.01 100.01];
Y=[0.05  0.06   50.04 50.05 50.06];
nRx=5;                % no. of receivers
Xref = 0.02;          % reference antenna coordinates (hence total=6)
Yref = 0.04;

TDOA=[0.0235424 0.17281532 0.0001875259 0.023730196 0.1729027]; %time difference of arrival..
Light=[300];

G=TDOA.*Light; %%% gives distance

for n=(1:nRx); 

    r(n) = realsqrt( ((X(n)-Xref)^2)+( (Y(n)-Yref)^2) ); % r(n)= receiver - ref.receiver
    rdx(n,:)= [X(n)-Xref]';
    rdy(n,:)= [Y(n)-Yref]';
    g2=TDOA.^2;
    r2=r(n).^2;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%% THE PROBLEM %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

MatrixA=[2*rdx , 2*rdy , 2*G'];
MatrixC=[r2 - g2]';
temp=MatrixA\MatrixC;
solX=temp(1)
SolY=temp(2)
solD=temp(3) 



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: System of equations in Matlab - difficulty - TDOA - hr21...@bath.ac.uk - Jul 7 9:58:25 2008

I have received an email with some suggestions..
This was resolved, thanks



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )