% % 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 = [1.0 2.0 22.2563 11.5218; 1.5 0.5 24.0 13.1759; 2.0 1.5 12.3207 7.5611; 2.5 2.0 6.8297 4.0617; 3.0 3.0 6.5709 4.2417; 3.5 5.0 6.2333 4.7593; 4.0 3.0 3.0715 2.7564; 4.5 5.0 3.6453 4.2079; 5.0 5.0 2.8239 4.8718; 5.5 5.0 1.7887 7.246; 6.0 5.0 5.1081 24.2367; 6.5 5.0 2.8352 6.3863; 7.0 5.0 2.025 2.7902; 7.5 5.0 1.6762 1.5862; 0.5 2.0 13.6035 6.9197; 1.3 1.0 23.3253 12.2532; 1.4 0.5 10.7454 5.682; 1.6 0.5 15.4263 8.315; 1.7 0.5 10.1266 5.5132; 5.8 5.0 0.75354 16.4277; 5.9 5.0 4.8943 29.0189; 6.1 5.0 4.6468 18.4419; 6.2 5.0 4.00 13.5412; 1.45 0.5 26.1946 13.986; 1.55 0.5 21.2197 11.4318; 1.42 0.5 13.806 7.3248; 1.43 0.5 15.2125 8.0899; 1.44 0.5 20.1297 10.7229]; % % 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;