function y = evaluatefis4(fileName,x)
    %#codegen
    %#internal
    
    persistent fisName fis
    if isempty(fisName)
        [fisName,fis] = loadFIS(fileName);
    elseif ~strcmp(fisName,fileName)
        [fisName,fis] = loadFIS(fileName);
    end

    opt = evalfisOptions('NumSamplePoints',51);
    y = evalfis(fis,x,opt);
end

function [fisName,fis] = loadFIS(fileName)
    fisName = fileName;
    fis = getFISCodeGenerationData(fisName);
end