The present code is a Matlab function that provides a computation of the:
1) one-sided amplitude spectrum;
2) one-sided phase spectrum;
3) frequency vector.
Two functions for spectral analysis are developed: one with firmly defined properties and one with customizable properties. Several examples are given in order to clarify the usage of each function. For convenience, the input and output arguments are given in the beginning of the functions.
The code is based on the theory described in:
 N. Majumdar, S. Banerjee. MATLAB Graphics and Data Visualization. Birmingham, Packt Publishing, 2012.
 D. Manolakis, V. Ingle. Applied Digital Signal Processing. Cambridge, Cambridge University Press, 2011.
 G. Heinzel, A. Rudiger, R. Schilling. Spectrum and spectral density estimation by the Discrete Fourier transform (DFT), including a comprehensive list of window functions and some new flat-top windows. Germany, Hannover, Max-Planck-Institut für Gravitationsphysik, 2002.