function zModelFreq = getModelAtFreq(zModel,arFreq)
% getModelAtFreq 
%   getModelAtFreq returns the model at a range of frequencies

%   Project: IMPACT
%   Title of Code: getModelAtFreq
%   Relevant additional documentation:
%   Developer: Carlos Gonzalez
%   External Dependencies: NA
%
%   Disclaimer
%   CAUTION: It is strongly recommended that changes to this code
%   should be avoided without first consulting with authors.

arMagnitude = interp1(zModel.arFreq,zModel.arMagnitude,arFreq,'linear','extrap');
arPhase = interp1(zModel.arFreq,zModel.arPhase,arFreq,'linear','extrap');
zModelFreq.arMagnitude = arMagnitude;
zModelFreq.arPhase = arPhase;
zModelFreq.arFreq = arFreq;