You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: getPSDFeatureSpringerHMM.m
    path of file: ./repos/heart-sounds-segmentation/hss/features
    
    the code of the file until where you have to start completion: %function [psd] = getPSDFeatureSpringerHMM(data, sampling_frequency, frequency_limit_low, frequency_limit_high)
%
% PSD-based feature extraction for heart sound segmentation.
%
%% INPUTS:
% data: this is the audio waveform
% sampling_frequency is self-explanatory
% frequency_limit_low is the lower-bound on the frequency range you want to
% analyse
% frequency_limit_high is the upper-bound on the frequency range
%
%% OUTPUTS:
% psd is the array of maximum PSD values between the max and min limits,
% resampled to the same size as the original data.
%
% This code was developed by David Springer in the paper:
% D. Springer et al., "Logistic Regression-HSMM-based Heart Sound
% Segmentation," IEEE Trans. Biomed. Eng., In Press, 2015.
%
%% Copyright (C) 2016  David Springer
% dave.springer@gmail.com
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% any later version.
%
    
function [psd] = getPSDFeatureSpringerHMM(data, sampling_frequency, frequency_limit_low, frequency_limit_high)
%
% PSD-based feature extraction for heart sound segmentation.
%
%% INPUTS:
% data: this is the audio waveform
% sampling_frequency is self-explanatory
% frequency_limit_low is the lower-bound on the frequency range you want to
% analyse
% frequency_limit_high is the upper-bound on the frequency range
%
%% OUTPUTS:
% psd is the array of maximum PSD values between the max and min limits,
% resampled to the same size as the original data.
%
% This code was developed by David Springer in the paper:
% D. Springer et al., "Logistic Regression-HSMM-based Heart Sound
% Segmentation," IEEE Trans. Biomed. Eng., In Press, 2015.
%
%% Copyright (C) 2016  David Springer
% dave.springer@gmail.com
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program.  If not, see <http://www.gnu.org/licenses/>.

function psd = getPSDFeatureSpringerHMM(data, sampling_frequency, frequency_limit_low, frequency_limit_high, figures)
  if nargin < 5
    figures = 0;
  end