% % This file processes the data from the first trial % function data = process_data_pendulum; % % enter the data as % frequency input (in cm) output amplitude (in cm) for X1 % % such as % % measured = [1.00 1.50 1.7; % 2.00 1.50 2.3 % 2.50 0.50 1.1]; % measured = [ 0.50 0.10 0.589; 1.00 0.10 0.600; 1.50 0.10 0.760; 2.00 0.10 0.948; 2.50 0.10 1.610; 3.00 0.05 2.940; 3.50 0.05 1.230; 4.00 0.05 0.515; 4.50 0.10 0.654; 5.00 0.10 0.431; 5.50 0.10 0.320; 6.00 0.10 0.263; 6.50 0.10 0.207; 7.00 0.10 0.169; 7.50 0.10 0.152; 1.05 0.10 0.636; 1.10 0.10 0.934; 1.20 0.10 0.723; 1.30 0.10 0.728]; % % 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;