From the documentation of the fft command on MATLAB,
fft(X,N) is the N-point fft, padded with zeros if X has less than N points and truncated if it has more.
fft(X,N) is the N-point fft, padded with zeros if X has less than N points and truncated if it has more.