function [F] = ff2(A,h,algor)
%
%  This function computes the F-matrix for different integration algorithms
%
%  1 = Backinterpolation 4th/5th order based on RKF 4/5 with theta = 0.45
%
I = eye(size(A));
Ah = A*h;
%
%  1 = Backinterpolation 4th/5th order based on RKF 4/5 with theta = 0.45
%
if algor==1,
  theta = 0.45;
  Af = Ah*theta;
  Af2 = Af*Af;
  Af3 = Af2*Af;
  Af4 = Af3*Af;
  Af5 = Af4*Af;
  Ff = I + Af + Af2/2 + Af3/6 + Af4/24 + Af5/104;
  Ab = Ah*(1 - theta);
  Ab2 = Ab*Ab;
  Ab3 = Ab2*Ab;
  Ab4 = Ab3*Ab;
  Ab5 = Ab4*Ab;
  Ab6 = Ab5*Ab;
  Fb = I - Ab + Ab2/2 - Ab3/6 + Ab4/24 - Ab5/120 + Ab6/2080;
  F = Fb\Ff;
  return,
end
%
return
