The code is pretty close. The fft of a real signal has positive and negative frequencies, and what you are seeing at the right end of the frequency plot is just the negative frequencies. After  using the fftshift function to swap halves of the array and  making a frequency grid with 0 in the center, you get the plot in fig. 2 which better displays positive and negative frequency contributiions.
The amplitudes for pos and neg frequency have the same absolute value, so what people do for plotting purposes is double the size of the positive amplitudes and throw away the negative amplitudes. Except the first point in the array, which is frequency 0, is not doubled.
Not having your signal file I made up some data. The example assumes tha N is even.
Fs = 48000;
N = 30*Fs;
data = .8*sin(2*pi*200*t).*exp(-1.5*t);
F = F(1:N/2);
Fdat(2:end) = 2*Fdat(2:end);
title('1st pipe sound')
title('1st sound fft result')