sisodata.m

来自「TSP问题matlab遗传算法verygood」· M 代码 · 共 22 行

M
22
字号
% This M-file creates SISO model with its input (u) and output (y)
% It is intended to generate random input data and its output from an
% arbitrary model
%
% Author: Wesam ELSHAMY
% wesamelshamy@ieee.org
% Electrical Engineering Dept., Cairo University, Egypt

%% Plant and input parameter
u = 10*rand(300,1);
o = [1 0.1  0.2 0.3];
p = [0 0.1 0.2];

%% Generate Model
idmodel2 = idpoly(o,p)

%% Generate Data
y = sim(idmodel2,u);
y=y+randn(size(y));

%% Plot
plot(y)

⌨️ 快捷键说明

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