18 lines
408 B
Mathematica
18 lines
408 B
Mathematica
|
|
function [ output_args ] = Armijo(z,newwordParameter,W,SEVolt,SEVAngle,d,g )
|
|||
|
|
%Armijo<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
a=0.9;
|
|||
|
|
b=0.1;
|
|||
|
|
output_args=a;
|
|||
|
|
for m=1:100
|
|||
|
|
objfun( SEVolt,SEVAngle,W,z,newwordParameter )
|
|||
|
|
if objfun( SEVolt+a^m*d(1:length(SEVolt)),SEVAngle+a^m*d(length(SEVolt)+1:end),W,z,newwordParameter )<=objfun( SEVolt,SEVAngle,W,z,newwordParameter )+b*a^m*g'*d
|
|||
|
|
output_args= a^m;
|
|||
|
|
return;
|
|||
|
|
end
|
|||
|
|
end
|
|||
|
|
|
|||
|
|
|
|||
|
|
end
|
|||
|
|
|