clear
close

fig=figure('Units','inches','Position',[0.0 0.0 8.5 11.0]...
,'PaperUnits','inches','PaperPosition',[0.0 0.0 8.5 11.0]);

load amp_dat;
n=size(amp_dat,1)
load amp_dat1;
n1=size(amp_dat1,1)

for i=1:n,
 f(i)=amp_dat(i,1)/6.283185307;
 xr(i)=amp_dat(i,2);
 xi(i)=amp_dat(i,3);
 yr(i)=amp_dat(i,4);
 yi(i)=amp_dat(i,5);
 zr(i)=amp_dat(i,6);
 zi(i)=amp_dat(i,7);
end

for i=1:n1,
 f1(i)=amp_dat1(i,1)/6.283185307;
 xr1(i)=amp_dat1(i,2)*100;
 xi1(i)=amp_dat1(i,3)*100;
 yr1(i)=amp_dat1(i,4)*100;
 yi1(i)=amp_dat1(i,5)*100;
 zr1(i)=amp_dat1(i,6)*100;
 zi1(i)=amp_dat1(i,7)*100;
end

amax(1)=max(abs(xr));
amax(2)=max(abs(yr));
amax(3)=max(abs(zr));
amax(4)=max(abs(xi));
amax(5)=max(abs(yi));
amax(6)=max(abs(zi));
amax(7)=max(abs(xr1));
amax(8)=max(abs(yr1));
amax(9)=max(abs(zr1));
amax(10)=max(abs(xi1));
amax(11)=max(abs(yi1));
amax(12)=max(abs(zi1));
amx=max(amax)*1.1
fmx=max(f)

subplot(3,2,1)
plot(f1,xr1,'-',f,xr,'--')
axis([0 fmx -amx amx])
title('Velocity Fourier Amplitude (Real Part)')
ylabel('Velocity_X Amplitude (cm)')
xlabel('Frequency (Hz)')

subplot(3,2,2)
plot(f1,xi1,'-',f,xi,'--')
axis([0 fmx -amx amx])
title('(Imaginary Part; Solid=Analytical, Dashed=FEM)')
ylabel('Velocity_X Amplitude (cm)')
xlabel('Frequency (Hz)')

subplot(3,2,3)
plot(f1,yr1,'-',f,yr,'--')
axis([0 fmx -amx amx])
ylabel('Velocity_Y Amplitude (cm)')
xlabel('Frequency (Hz)')

subplot(3,2,4)
plot(f1,yi1,'-',f,yi,'--')
axis([0 fmx -amx amx])
ylabel('Velocity_Y Amplitude (cm)')
xlabel('Frequency (Hz)')

subplot(3,2,5)
plot(f1,zr1,'-',f,zr,'--')
axis([0 fmx -amx amx])
ylabel('Velocity_Z Amplitude (cm)')
xlabel('Frequency (Hz)')

subplot(3,2,6)
plot(f1,zi1,'-',f,zi,'--')
axis([0 fmx -amx amx])
ylabel('Velocity_Z Amplitude (cm)')
xlabel('Frequency (Hz)')

print p.ps
