Code covered by the BSD License  

Highlights from
Mathematical Modeling with MATLAB Products - webinar demo files

image thumbnail

Mathematical Modeling with MATLAB Products - webinar demo files

by

 

Demo files from March 10, 2011 webinar titled 'Mathematical Modeling with MATLAB Products'

swingMagConst(x, ptotal, r, maxAng)
function [c, ceq] = swingMagConst(x, ptotal, r, maxAng)
% Compute nonlinear inequalities at x.
% Compute nonlinear equalities at x.

% Copyright 2011 The MathWorks, Inc.

sol = solveCraneODE(x, ptotal, r);

% Compute the maximum absolute angle of oscillation
swingmax = max(abs(sol.Y(:,1)))*180/pi;

c = swingmax - maxAng;
ceq = [];

end

Contact us