⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bfgs_f_celu_grad.m

📁 Control optimisation. It is example of use BFGS algorithm to control satellite form Earth atmosphere
💻 M
字号:
% gradient funkcji celu
function q = f_celu_grad(tau,main_x0,main_h0,u2,tu2)
h = 1e-6;
for i = 1:length(tau)
    e = zeros(length(tau),1);
    e(i) = 1;
    taueh = tau+e*h;
    [pom_u2,pom_tu2] = zmien_u2(taueh,u2,tu2);
%     for j=1:50
%         taueh = tau+e*h*j;
%         probka(j)=bfgs_f_celu2(taueh,main_x0,main_h0,pom_u2);
%     end
%     figure(5);
%     plot((1:50)*h,probka);
      
    F1 = bfgs_f_celu2(taueh,main_x0,main_h0,pom_u2);
    F2 = bfgs_f_celu2(tau,main_x0,main_h0,u2);
    
    
    Q_grad(i) = (F1-F2)/h;
end
q = Q_grad'


end % koniec funkcji

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -