%% Resample Sobol Indices to New Time Points
%
% Load the lotka model.

m = sbmlimport("lotka");

%
% Decompose the variance of predators y2 into attributions of the initial values of the prey y1 and predators.

sobolResults = sbiosobol(m,["y1","y2"],"y2","StopTime",1);
plot(sobolResults);

%
% Resample the Sobol indices to a new time vector.

newSobolResults = resample(sobolResults,linspace(0,1,50));
plot(newSobolResults);

% Copyright 2019 The MathWorks, Inc.