Code covered by the BSD License  

Highlights from
New Approaches to Constrained Optimization in MATLAB

image thumbnail
from New Approaches to Constrained Optimization in MATLAB by Rakesh Kumar
M-files accompanying the webinar held on November 05, 2005

springObjective(x,Fo,Fc,delta,G,rho)
function y = springObjective(x,Fo,Fc,delta,G,rho)
% Objective function to calculate the weight of a helical spring


D = x(1);
d = x(2);
k = (Fo-Fc)/delta;
N = G*d^4/(8*D^3*k);
% Weight
y = pi^2*d^2*D*N*rho/4;

Contact us at files@mathworks.com