% % This file processes the data from the first trial % function data = process_data_2dof % % enter the data as % frequency (in Hz) input (in cm/degrees/radians) output(in cm/degrees/radians) % % such as % % measured = [1.0 0.150 1.740 1.000; % 1.5 0.150 2.300 1.200; % 2.0 0.50 1.100 0.900]; % measured = [ 0.5 3.0 19.90 10.69; 1.0 3.0 23.70 12.29; 1.5 2.0 31.59 17.42; 2.0 0.5 17.85 10.57; 2.5 1.5 11.38 7.61; 3.0 2.5 9.20 7.08; 3.5 2.5 6.11 5.75; 4.0 2.5 3.63 4.79; 4.5 2.5 2.08 4.70; 5.0 4.0 1.98 11.51; 5.5 1.0 6.30 15.75; 6.0 4.0 5.82 7.23; 6.5 4.0 3.86 3.25; 7.0 4.0 2.85 1.79; 7.5 4.0 2.33 1.16; 5.9 4.0 5.20 7.40; 5.6 1.0 4.24 9.38; 5.7 1.0 3.03 6.00; 5.8 2.0 4.35 7.26; 5.4 1.0 1.94 7.21; 5.3 2.0 2.46 11.28; 5.2 4.0 3.04 18.20; 5.1 4.0 1.00 13.57; 1.6 1.0 16.62 9.22; 1.7 1.0 27.50 15.48; 1.8 0.5 15.70 9.30; 1.9 0.4 21.74 12.68; 2.1 0.4 8.30 5.01; 2.2 0.4 6.29 3.86]; % % Be sure the rows are sorted by frequency % measured = sortrows(measured,1); % % get the magnitude of the transfer function % H1 = measured(:,3)./measured(:,2); H2 = measured(:,4)./measured(:,2); f = measured(:,1); data = [f H1 H2]; % return;