bp_obj.m
来自「% Atomizer Main Directory, Version .802 」· M 代码 · 共 20 行
M
20 行
function [obj,grad,hess] = BP_obj( x )
% [obj,grad,hess] = BP_obj( x )
% computes the objective value, gradient and diagonal Hessian
% of the linear function e'x, where e is a vector of 1s.
% For use with BP_Interior2.m (which uses pdsco.m).
%-----------------------------------------------------------------------
% 20 Feb 2001: First version of BP_obj.
% Michael Saunders, SOL, Stanford University.
%-----------------------------------------------------------------------
n = length(x);
obj = sum(x);
grad = ones(n,1);
hess = zeros(n,1);
%-----------------------------------------------------------------------
% End function BP_obj
%-----------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?