function [tnew,yPred,fPred,yCorr,fCorr] = PCStep(fname,tc,yc,fvals,h,d)
% Single step using the kth-order Adams predictor-corrector framework.
%
% fname is a string that names a function of the form f(t,y)
% where t is a scalar and y is a column m-vector.
%
% yc is an approximate solution to y'(t) = f(t,y(t)) at t=tc.
%
% fvals is an m-by-d matrix where fvals(:,i) is an approximation
% to f(t,y) at t = tc +(1-i)h, i=1:d
%
% h is the time step.
%
% d is the order of the Adams methods used, 1<=k<=5.
%
% tnew=tc+h,
% yPred is the predicted solution at t=tnew
% fPred = f(tnew,yPred)
% yCorr is the corrected solution at t=tnew
% fCorr = f(tnew,yCorr).

[tnew,yPred,fPred] = ABStep(fname,tc,yc,fvals,h,d);
[tnew,yCorr,fCorr] = AMStep(fname,tc,yc,[fPred fvals(:,1:d-1)],h,d);