function [p] = forcer (t, ndfree) % * * * * * * * * * * * * * * * * * * * * * * * * * * * * % define forcing function for step by step integration % NOTE: this requires application dependent functions % * * * * * * * * * * * * * * * * * * * * * * * * * * * * p = zeros(ndfree) ; f2=3000.; f3=4000.; f4=-2000.; tone = 0.1; % transient test problem bigg's p. 123, linear ramp (decreasing) foft = 0.0 ; if t < tone foft = 1.-t/tone ; end % if on ramp p(1) = 0. ; p(2) = f2*foft ; p(3) = f3*foft ; p(4) = f4*foft ; end % function forcer