close all
clear all

X0 = [ 0 100 100 0];
Y0 = [0 0 100 100];

C0 = 1000;

N = length(X0);

Tij = zeros(N,N);

figure;
grid on;
hold on;
axis([-10 110 -10 110]);
  
for i = 1:N
    plot(X0(i),Y0(i),'.');
    for j = 1:N
     Tij(i,j) = 2*sqrt((X0(i)-X0(j))^2+(Y0(i)-Y0(j))^2)/C0;       
    end
end


%Introduce random error 
TijMean =  mean(mean(Tij));
Error = .1*TijMean*(rand(N)-.5);
Tij = Tij+Error;

[c nu] = SpeedOfSound(X0,Y0,Tij);

%[x,y,v] = ComputePositions( Tij, C0, X0, Y0);


