Files
-
manufacturing / PCB / Shield / shield.brd
-
manufacturing / PCB / Shield / shield.sch
-
manufacturing / PCB / Shield / shield_bigfpga.brd
-
manufacturing / PCB / Shield / shield_bigfpga.sch
-
manufacturing / PCB / TransducerBoard / bigTransBrd.brd
-
manufacturing / PCB / TransducerBoard / bigTransBrd.sch
-
manufacturing / PCB / TransducerBoard / smallTransBrd.brd
-
manufacturing / PCB / TransducerBoard / smallTransBrd.sch
Last update 6 years 2 months
by
JosefMatous
FilesMATLAB optimization | |
---|---|
.. | |
ghostTouch | |
levitation | |
BFGSsolve.m | |
readme.htm |
BFGSsolve.mfunction x = BFGSsolve(critFunc,init,gradTolerance,displayIter) x = init; [o,g] = critFunc(x); iter = 1; invHess = eye(numel(init)); if displayIter == true fprintf('|Iteration|Function value|Step size|Gradient size|\n'); fprintf('|---------|--------------|---------|-------------|\n'); end while (norm(g) > gradTolerance) % search direction dir = - invHess*g; % line search alpha = 1; beta = 0.5; sigma = 0.0001; step = dir*alpha; xNew = x+step; [oNew,gNew] = critFunc(xNew); cond = -sigma*g'*dir; while (o - oNew < alpha*cond) alpha = alpha*beta; step = dir*alpha; xNew = x + step; [oNew,gNew] = critFunc(xNew); end % Hessian approx. update y = gNew - g; scale = step'*y; invHess = invHess + (scale+y'*invHess*y)/(scale^2)*(step*step') - ... (invHess*y*step'+step*y'*invHess)/scale; % status if displayIter == true fprintf('|%9d|%14.4f|%9.5f|%13.4e|\n',iter,o,alpha,norm(gNew)); end % next step o = oNew; g = gNew; x = xNew; iter = iter + 1; end end