📄 mgts.m
字号:
% This is a function for generation Mackey-Glass Time Series
% Fix the value of n = 1000 to 10000
% MG Series is periodic for tau<17 otherwise non-periodic
% Initial values are generated randomly using rand function
% Eular's method is for solving MG diffrential equation
% ds(t)/dt = 0.2s(t-tau)/(1+s(t-tau)^10) - 0.1s(t)
function mydata = mgts(n);
tau = 30;
for t = 1:n
if t<= tau
s(t) = rand;
else
s(t) = 0.9*s(t-1)+(0.2*s(t-tau))/(1+s(t-tau)^10);
end
end
mgs = s';
mydata = mgs(1001:2000)';
t=1001:2000;
% plot(t, mydata);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -