%
%  This file processes the frequency response data
%
function data = process_data;
%
%  enter the data as 
%       frequency (in Hz), input (in rad), output amplitude (in rad) 
%
%  such as 
%
%  measured = [1.00 1.50 1.7;
%              2.00 1.50 2.3
%              2.50 0.50 1.1];
%

  measured =  [1.20 0.087 0.087;
               1.30 0.087 0.251;
               1.40 0.087 0.566;
               1.50 0.087 0.970;
               1.60 0.087 0.700;
               1.70 0.087 0.460;
               1.80 0.087 0.365;
               1.90 0.087 0.291;
               2.00 0.087 0.252;
               2.25 0.087 0.210;
               2.50 0.087 0.170;
               3.00 0.087 0.157;
               3.50 0.087 0.133;
               4.00 0.087 0.125;
               1.45 0.087 1.110;
               1.55 0.087 0.815;
               1.35 0.087 0.360];
%
%  Be sure the rows are sorted by frequency
%
   measured = sortrows(measured,1);
%
%  get the magnitude of the transfer function
%
  H = measured(:,3)./measured(:,2);
  f = measured(:,1); 
  data = [f H];
%
  return;