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

📄 wylicz_u1.m

📁 Control optimisation. It is example of use BFGS algorithm to control satellite form Earth atmosphere
💻 M
字号:
%   wylicza wektor u1 z podanego wektora tau
function wektor_u1 = wylicz_u1 ( tau, t)
global u1max;

tau0 = [0 tau];
nr_tau = 1;

% znajdowanie punktow przelaczen:
punkty = ones(1,length(tau0));
roznice = ones(1,length(tau0));
for j=2:(length(tau0)-1)
    for i=2:length(t)
        if abs(tau0(j)-t(i))<roznice(j)
            punkty(j) = i;
            roznice(j) = tau0(j)-t(i);
        end
    end
end
punkty(length(tau0)) = length(t);

% wyliczenie u1:
u1akt = 0;
wektor_u1 = [];
for i=1:length(t)
    if i==punkty(nr_tau)
        if (u1akt>0)
            u1akt = 0;
        else
            u1akt = u1max;
        end
        nr_tau = nr_tau + 1;
    end
    wektor_u1 = [wektor_u1 u1akt];
end

end

⌨️ 快捷键说明

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