function compare(A,B,radius)
%function compare(A,B) compares two linear structures and plots a graph
%the third parameter defines the x axis scale.

if nargin<3
   radius = 100
end
x = 0:size(A,1)-1;
x = x*(2*radius/(size(A,1)-1));
x = x-(radius);
semilogy(x,A(1:size(A,1)));
hold on
semilogy(x,B(1:size(B,1)),'r--');

%add a legend
if isempty(inputname(1))
   str1='A';
else
   str1 = inputname(1);
end
if isempty(inputname(2))
   str2='B';
else
   str2 = inputname(2);
end
legend(str1,str2);