MATLAB: Error using bandpass and pspectrum function

bandpasspspectrum

I am trying to band filter a response saved as .txt file and display the power spectrum
it returns the error : Undefined function 'bandpass' for input arguments of type 'double'.
it returns the same error for pspectrum.
kindly help.
load pop.txt; % brings in ASCII text file containing pressure values
bandpass(pop, [880 1130], fs); % trying to filter the signal for centre frequency 1kHz and fs sampling rate
pspectrum(pop,fs);

Best Answer

The pspectrum function was released in R2017b. Depending on what you want to do, use the spectrogram (link) function or the the pwelch (link) functo to get the power spectral density. If you want to look at your signals before and after filtering, see: Power Spectral Density Estimates Using FFT (link).
Since you do not have the bandpass function, the next best option is to use an elliptic filter. See the documentation on ellip (link) and related functions (linked to in that page) to understand how to design it. The design is straightforward, and elliptical filters are probably the most computationally efficient of any design.