function lam = lyapunov(x,dt)
% calculate lyapunov coefficient of time series
[ndata nvars]=size(x);
N2 = floor(ndata/2);
N4 = floor(ndata/4);
TOL = 1.0e-6;
exponent = zeros(N4+1,1);
for i=N4:N2 % second quartile of data should be sufficiently evolved
dist = norm(x(i+1,:)-x(i,:));
indx = i+1;
for j=1:ndata-5
if (i ~= j) && norm(x(i,:)-x(j,:))<dist
dist = norm(x(i,:)-x(j,:));
indx = j; % closest point!
end
end
expn = 0.0; % estimate local rate of expansion (i.e. largest eigenvalue)
for k=1:5
if norm(x(i+k,:)-x(indx+k,:))>TOL && norm(x(i,:)-x(indx,:))>TOL
expn = expn + (log(norm(x(i+k,:)-x(indx+k,:)))-log(norm(x(i,:)-x(indx,:))))/k;
end
end
exponent(i-N4+1)=expn/5;
end
plot(exponent); % plot the estimates for each initial point (fairly noisy)
sum=0; % now, calculate the overal average over N4 data points ...
for i=1:N4+1
sum = sum+exponent(i);
end
lam=sum/((N4+1)*dt); % return the average value
% if lam > 0, then system is chaotic
bist.rar_The Program
版权申诉
26 浏览量
2022-09-24
20:33:33
上传
评论
收藏 21KB RAR 举报
alvarocfc
- 粉丝: 109
- 资源: 1万+
最新资源
- 6_Advertising-gd_LearningRate.ipynb
- 12_base.apk
- 520马上到了两款动态爱心表白HTML代码(附源码)李峋同款爱心,快送给你爱的她或(他)吧12 情侣纪念日代码.zip
- 电子设计竞赛的单相不间断电源设计
- cutcamera1715961370938.png
- 基于MATLAB的图像处理课程设计报告.doc
- tensorflow-gpu-2.6.0-cp38-cp38-manylinux2010-x86-64.whl
- mmexport1715960553858.png
- tensorflow-gpu-2.6.0-cp37-cp37m-manylinux2010-x86-64.whl
- 通过 .NET 应用程序中的源代码查找 SQL 注入
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈