function x = odesolve(Factors, piv, b)
% Solving with the compact factor form from odefactorize

%   Copyright 1984-2022 The MathWorks, Inc.

if isequal(piv, -1) % isa(A, 'decomposition') waiting until this is fast
    x = Factors\b;
else
    x = matlab.internal.decomposition.builtin.luSolve(Factors,piv,b);
end
