%Tadd Truscott 3-31-05 %13.42 Lab %Compare the bret schnieder resonse predicted by using the monochromatic %waves in part1 with the actual response fromt the sensors. %Run bret before running this %Please input your values for the following matrices from analyse_resonse.m %results. heave=[1.83748 1.09137 0.720767 0.0291853]; %heave amplitudes pitch=[14.377 6.67093 3.25879 0.715655]; %Pitch amplitudes wave=[1.43131 1.49521 1.15399 1.04665]; %Wave amplitudes W=conv(P,(abs(heave./wave)).^2); Wp=conv(P,(abs(pitch./wave)).^2); %wmax=max(W); %W=W./wmax; %[mag,phase,wrange]=bode(W); %predicted Actual heave response vs. Analytical response figure(5) plot(D,G,D,W(1:size(D)),'--'); title('Heave predicted and actual reponses'); xlabel('Frequency, rad/s'); ylabel('Heave response to Bret Schneider input'); legend('Actual Response','Analytical Response'); axis([0 20 0 0.1]); %predicted Actual heave response vs. Analytical response figure(6) plot(B,A,B,Wp(1:size(A)),'--'); title('Pitch predicted and actual responses'); xlabel('Frequency, rad/s'); ylabel('Heave response to Bret Schneider input'); legend('Actual Response','Analytical Response'); axis([0 20 0 0.2]);