%Tadd Truscott modified on 3-31-05 % Jason Dahl original creator % Make pitch and heave response plots % 5/5/03 %Plug in the values you got from analyze_response.m into the appropriate %matrices below and the function will automatically plot the results. %feel free to add more plots if you have a different way you would like to %look at the situation. clear all; omega = [0.88 1.00911 1.12915 1.9531]; %frequency in hz omega_u = [0.897836 1.06071 1.1967]; %frequency omega with forward speed h_a = [1.27679 0.729915 0.624585 0.027846]; %heave amplitude h_a_u =[1.18512 0.967033 0.704516]; %heave amplitude with forward speed pitch = [14.377 6.67093 3.25879 0.715655]; %pitch amplitude pitch_u = [21.0584 8.56189 3.35126]; %Pitch amplitude with forward speed figure(1); plot(omega,h_a,'o',omega,h_a,'--'); xlabel('Frequency, hz'); ylabel('Heave/Wave Amplitude'); title('Heave Response Spectrum - no forward speed'); grid on; figure(2); plot(omega,pitch,'o',omega,pitch,'--'); xlabel('Frequency, hz'); ylabel('Pitch Response, rad'); title('Pitch Response Spectrum, no forward speed'); grid on; figure(3); plot(omega,h_a,'bo',omega,h_a,'b-',omega_u,h_a_u,'rsq',omega_u,h_a_u,'r--'); xlabel('Frequency, hz'); ylabel('Heave/Wave Amplitude'); title('Heave Response Spectrum'); legend('0 m/s','0 m/s', '0.7 m/s','0.7 m/s'); grid on; figure(4); plot(omega,pitch,'bo',omega,pitch,'b-',omega_u,pitch_u,'rsq',omega_u,pitch_u,'r--'); xlabel('Frequency, hz'); ylabel('Pitch Response, rad'); title('Pitch Response Spectrum'); legend('0 m/s','0 m/s', '0.7 m/s','0.7 m/s'); grid on;=