資源簡介
在MATLAB軟件中,采用互信息法計(jì)算時(shí)間序列的延遲時(shí)間。

代碼片段和文件信息
%?互信息法求時(shí)延
%?使用平臺?-?Matlab6.5?/?Matlab7.0
%?作者:陸振波,海軍工程大學(xué)
%?歡迎同行來信交流與合作,更多文章與程序下載請?jiān)L問我的個(gè)人主頁
%?電子郵件:luzhenbo@yahoo.com.cn
%?個(gè)人主頁:http://luzhenbo.88uu.com.cn
clc
clear
close?all
%----------------------------------------------------------------------%
%?產(chǎn)生混沌時(shí)間序列
sigma?=?10;?????????????%?Lorenz?方程參數(shù)?a
b?=?8/3;????????????????%?????????????????b
r?=?34;?????????????????%?????????????????c????????????
y?=?[-101];???????????%?起始點(diǎn)?(1?x?3?的行向量)
h?=?0.01;???????????????%?積分時(shí)間步長
k1?=?6000;??????????????%?前面的迭代點(diǎn)數(shù)
k2?=?3000;??????????????%?后面的迭代點(diǎn)數(shù)
z?=?LorenzData(yhk1+k2sigmarb);
z?=?z(k1+1:end:);
%----------------------------------------------------------------------%
%?調(diào)用?mex?函數(shù)
X?=?z(:1);?????????????%?時(shí)間序列,列向量
maxLags?=?100;??????????%?最大時(shí)延
Part?=?128;?????????????%?每一座標(biāo)劃分的份數(shù)
r?=?Mutual_Information(XmaxLagsPart);
%----------------------------------------------------------------------%
%?尋找第一個(gè)局部極小點(diǎn)
for?i?=?1:length(r)-1???????????
????if?(r(i)<=r(i+1))
????????tau?=?i;????????%?第一個(gè)局部極小值位置
????????break;
????end
end
optimal_tau?=?tau?-1????%?r?的第一個(gè)值對應(yīng)?tau?=?0所以要減?1
%----------------------------------------------------------------------%
%?圖形顯示
plot(0:length(r)-1r)
xlabel(‘Lag‘);
title(‘互信息法求時(shí)延‘);
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????1397??2007-03-15?15:13??Main_Mutual_Information\Main_Mutual_Information.m
?????文件????????1618??2019-04-17?13:35??Main_Mutual_Information\mutual_information.m
?????目錄???????????0??2019-04-17?14:03??Main_Mutual_Information\
評論
共有 條評論