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: Loudness_ISO532_1_from_wavfile.m
    path of file: ./repos/SQAT/psychoacoustic_metrics/Loudness_ISO532_1
    
    the code of the file until where you have to start completion: function OUT = Loudness_ISO532_1_from_wavfile(wavfilename, dBFS, field, method, time_skip, show)
% function OUT = Loudness_ISO532_1_from_wavfile(wavfilename, dBFS, field, method, time_skip, show)
%
%  Zwicker Loudness model according to ISO 532-1:2017 for stationary 
%    signals (Method A) and arbitrary signals (Method B).
%
%  This script, Loudness_ISO532_1_from_wavfile, calls internally the main
%    loudness algorithm, Loudness_ISO532_1. The only difference is that 
%    Loudness_ISO532_1_from_wavfile requires a file name as first input
%    argument and the dBFS convention value as the second input argument.
%
%  Reference signal: 40 dBSPL 1 kHz tone yields 1 sone
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% INPUT ARGUMENTS
%   wavfilename : file name containing the input signal 'insig' to be 
%       processed and the sampling frequency 'fs' of insig. Wavfilename 
%       should be visible to MATLAB.
%
%   dBFS: dB sound pressure level equivalent to the full scale value. If 
%       dBFS is 94 dB SPL (default), the amplitudes of 'insig' are interpreted
%       as expressed in pressure units (Pa).
%
%   field : integer 
%   free field = 0; diffuse field = 1;
%
%   method : integer 
%   0 = stationary (from input 1/3 octave unweighted SPL)
%   1 = stationary (from audio file) 
%   2 = time varying (from audio file)  
%
%   time_skip : integer
%   skip start of the signal in <time_skip> seconds for level (stationary signals) and statistics (stationary and time-varying signals) calculations
%
%   show : logical(boolean)
%   optional parameter for figures (results) display
%   'false' (disable, default value) or 'true' (enable).
%
% OUTPUTS (method==0 and method==1; stationary method)
%   OUT : struct containing the following fields
%
%       * time_insig - time vector of the audio input, in seconds
%       * barkAxis - bark vector

    
function OUT = Loudness_ISO532_1_from_wavfile(wavfilename, dBFS, field, method, time_skip, show)
% function OUT = Loudness_ISO532_1_from_wavfile(wavfilename, dBFS, field, method, time_skip, show)
%
%  Zwicker Loudness model according to ISO 532-1:2017 for stationary 
%    signals (Method A) and arbitrary signals (Method B).
%
%  This script, Loudness_ISO532_1_from_wavfile, calls internally the main
%    loudness algorithm, Loudness_ISO532_1. The only difference is that 
%    Loudness_ISO532_1_from_wavfile requires a file name as first input
%    argument and the dBFS convention value as the second input argument.
%
%  Reference signal: 40 dBSPL 1 kHz tone yields 1 sone
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% INPUT ARGUMENTS
%   wavfilename : file name containing the input signal 'insig' to be 
%       processed and the sampling frequency 'fs' of insig. Wavfilename 
%       should be visible to MATLAB.
%
%   dBFS: dB sound pressure level equivalent to the full scale value. If 
%       dBFS is 94 dB SPL (default), the amplitudes of 'insig' are interpreted
%       as expressed in pressure units (Pa).
%
%   field : integer 
%   free field = 0; diffuse field = 1;
%
%   method : integer 
%   0 = stationary (from input 1/3 octave unweighted SPL)
%   1 = stationary (from audio file) 
%   2 = time varying (from audio file)  
%
%   time_skip : integer
%   skip start of the signal in <time_skip> seconds for level (stationary signals) and statistics (stationary and time-varying signals) calculations
%
%   show : logical(boolean)
%   optional parameter for figures (results) display
%   'false' (disable, default value) or 'true' (enable).
%
% OUTPUTS (method==0 and method==1; stationary method)
%   OUT : struct containing the following fields
%
%       * time_insig - time vector of the audio input, in seconds
%       * barkAxis - bark vector
%       * SpecificLoudness - time-averaged specific loudness (sone/Bark) 
%       * Loudness - loudness (sone) 
%       * LoudnessLevel - loudness level (phon)
%       * TimeAveragedSPL - time-averaged overall SPL (1/3 octave bands, DBSPL)
% 
% OUTPUTS (method==2; time-varying method)
%   OUT : struct containing the following fields
%
%       * barkAxis - vector of Bark band numbers used for specific loudness computation
%       * time - time vector of the final loudness calculation, in seconds
%       * time_insig - time vector of insig, in seconds
%       * InstantaneousLoudness - instantaneous loudness (sone) vs time
%       * InstantaneousSpecificLoudness - specific loudness (sone/Bark) vs time
%       * InstantaneousLoudnessLevel - instantaneous loudness level (phon) vs time
%       * SpecificLoudness - time-averaged specific loudness (sone/Bark) 
%       * InstantaneousSPL - overall SPL (1/3 octave bands) for each time step, in dBSPL
%       * Several statistics based on the InstantaneousLoudness 
%         ** Nmean : mean value of InstantaneousLoudness (sone)
%         ** Nstd : standard deviation of InstantaneousLoudness (sone)
%         ** Nmax : maximum of InstantaneousLoudness (sone)
%         ** Nmin : minimum of InstantaneousLoudness (sone)
%         ** Nx : percentile loudness exceeded during x percent of the signal (sone)
%         ** N_ratio : ratio between N5/N95 ( 1.1 (stationary)> N_ratio > 1.1 (time varying) )
%           *** HINT: loudness calculation takes some time to have a steady-response
%                     therefore, it is a good practice to consider a time_skip to compute the statistics 
%                     due to transient effects in the beginning of the loudness calculations
%
% Stand-alone example:
%   fname = [basepath_SQAT 'sound_files' filesep 'reference_signals' filesep 'RefSignal_Loudness_ISO532_1.wav'];
%   dBFS = 94; % default for SQAT
%   Loudness_ISO532_1_from_wavfile(fname,dBFS);
%
% Author: Alejandro Osses
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if nargin == 0
    help Loudness_ISO532_1_from_wavfile;
    return;
end