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: multitaper_spectrogram.m
    path of file: ./repos/multitaper_toolbox/matlab
    
    the code of the file until where you have to start completion: function [mt_spectrogram,stimes,sfreqs] = multitaper_spectrogram(varargin)
%MULTITAPER_SPECTROGRAM  Compute the multitaper spectrogram for time series data
%
%   Usage:
%   Direct input:
%       [spect,stimes,sfreqs] = multitaper_spectrogram(data, Fs, frequency_range, taper_params, window_params, min_NFFT, detrend_opt, weighting, plot_on, verbose)
%
%   Input:
%      
    
function [window_idxs, stimes, sfreqs, freq_inds] = get_windows(Fs, nfft, frequency_range, window_start, datawin_size)
%Create the frequency vector
df = Fs/nfft;
sfreqs = 0:df:Fs; % all possible frequencies

%Get just the frequencies for the given frequency range
freq_inds = (sfreqs >= frequency_range(1)) & (sfreqs <= frequency_range(2));
sfreqs = sfreqs(freq_inds);

%Compute the times of the middle of each spectrum
window_middle_samples = window_start + round(datawin_size/2);
stimes = (window_middle_samples-1)/Fs; % stimes start from 0

%Data windows
window_idxs = window_start' + (0:datawin_size-1);
end