📄 fmukai.m
字号:
function [f, J] = fmukai(x, ctrl)
%Call: [f J]=fmukai(x,ctrl)
%Evaluate the residual f(i)=(x(i)-x(i+3) corresponding
%to the objective in a nonlinear lsq problem.
%If ctrl>0 the Jacobian J is computed analytically.
%Objective: 0.5*norm2(f)
%The problem is defined as
% min 0.5*norm2(f(x))
% s.t. h(x)>=0
%where
%h(1)=-x(1)^2-x(2)^2-x(3)^2+5;
%h(2)=-(x(4)-3)^2-x(5)^2+1;
%and 4 <= x(6) <= 8
%
for i=1:3
f(i)=x(i)-x(i+3);
end
f=f(:);
%The Jacobian is set to the empty matix to indicate that it should
%be computed using forward differences
J=[];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -