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

📄 obj.m

📁 基于GA工具箱对坦克进行动态控制仿真
💻 M
字号:
% Author: Housam Binous

% Dynamic and control of a tank using the genetic algorithm toolbox

% National Institute of Applied Sciences and Technology, Tunis, TUNISIA

% Email: binoushousam@yahoo.com

function f=obj(par)

global t1 h

% step response and transfer function of the tank

A=par(1);
B=par(2);

num=[1];
den=[A,B];
sys=tf(num,den);

[y t2]=step(sys,0:1:500);

% function to be minimized by fminsearch in order
% to obtain the first order transfer function of 
% the tank

f=0;

for i=1:500
    f=f+(h(i)-y(i))^2;
end

end

⌨️ 快捷键说明

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