function output = #FILENAME(#INPUT_ARGS) #HEADER_COMMENT #PROBLEM_DEFINITION_COMMENT %Steps to evaluate function: %Check input type %Create constants for table value and breakpoint values %Initialize variables and set their type %Perform pre-lookup to get the index and fraction corresponding to input %Calculate the output value #LOAD_MAT_FILE #CAST_INPUT_VALUE #BREAKPOINT_VALUES #TABLE_VALUES #INDEX_TYPE #OUTPUT_TYPE %Interpolation #STRIDE index = zeros(length(inputValues1),nargin,'like',idxType); #PRELOOKUP #OUTPUT_LOGIC #REMOVE_FIMATH end function idx = preLookUpIndexOnly(input,bpdata,idxType) %Function to calculate index value. idx = zeros(size(input), 'like',idxType); %Index Search #INDEX_SEARCH idx(input >= bpdata(end)) = length(bpdata); idx(idx == 0) = 1; end