Path: SC/Dynamics
% The right hand side of equations formulated using Lagrange multipliers [M, Q] = fDyn( x, t, dynData ); [phi, phiQ, phiTDot, phiDot, phiQDot] = fConstraint( x, t, constData ) 2 2 The equations of motion are M d x/dt = Q The constraints are phi = 0 If nIts > 0 it will use the iterative formulation. Since version 2. -------------------------------------------------------------------------- Form: xDot = FDC( x, t, fDyn, fConstraint, dynData, constData, penalty, nIts ) -------------------------------------------------------------------------- ------ Inputs ------ x (:,1) The state vector [x;xDot] t Time fDyn (1,:) Name of the dynamics function fConstraint (1,:) Name of the constraint function dynData (:,:) Data to be passed to the dynamics function constData (:,:) Data to be passed to the constraint function penalty (1,3) Penalty function scalars [alpha, mu, omega] nIts (1,1) Number of iterations ------- Outputs ------- xDot (:,1) The derivative of the state vector --------------------------------------------------------------------------
Back to the SC Module page