try
    oetroot;
catch
    oetsettings('quiet');
end

simulationdirs = {'../examples/13_S1/';'../examples/14_S2/';'../examples/15_S3/'};

try
    delete('simulation_results.txt')
catch 
end

diary simulation_results.txt
for k = 1:length(simulationdirs)
    simdir = simulationdirs{k};
    trimfile = [simdir ls([simdir '/trim*.dat'])];
    disp(trimfile)
    n = 2 % n-location
    m = 2 % m-location
    t = 2 % timestep number
    
    [Ju, Jv, checkval] = get_approximate_jacobian(trimfile,n,m,t)
end
diary off