微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

耦合系统的相似函数

如何解决耦合系统的相似函数

我需要为完成的系统编写一个相似性函数并为其构建图表。但是我很难写。也许有人知道如何写下来(图1)并得到图表(图2(1)) Figure 1 Figure 2(1)

我的这个系统的代码

#We define a function which is going to be the recursive function.
def num_rossler(x1_n,y1_n,z1_n,x2_n,y2_n,z2_n,h,a,b,c,k,w1,w2):
    x1_n1=x1_n+h*(-w1*y1_n-z1_n+K*(x2_n-x1_n)) 
    y1_n1=y1_n+h*(w1*x1_n+a*y1_n)
    z1_n1=z1_n+h*(b+z1_n*(x1_n-c))   
 
    x2_n1=x2_n+h*(-w2*y2_n-z2_n+K*(x1_n-x2_n))
    y2_n1=y2_n+h*(w2*x2_n+a*y2_n)
    z2_n1=z2_n+h*(b+z2_n*(x2_n-c))
    return x1_n1,y1_n1,z1_n1,x2_n1,y2_n1,z2_n1
 
#Now we prepare some variables
#First the parameters
a=0.165
b=0.2
c=10
K=0.1
w1=0.99
w2=0.95

#Them the time interval and the step size
t_ini=0
t_fin=10000
h=0.01
numsteps=int((t_fin-t_ini)/h)
 
#using this parameters we build the time.
t=numpy.linspace(t_ini,t_fin,numsteps)
#And the vectors for the solutions
x1=numpy.zeros(numsteps)
y1=numpy.zeros(numsteps)
z1=numpy.zeros(numsteps)
x2=numpy.zeros(numsteps)
y2=numpy.zeros(numsteps)
z2=numpy.zeros(numsteps)
 
#We set the initial conditions
x1[0]=0.001
y1[0]=0.001
z1[0]=0.001
 
x2[0]=0.002
y2[0]=0.002
z2[0]=0.002
n=x1.size-1
 
#This is the main loop where we use the recursive system to obtain the solution
for k in range(0,n):
    #We use the prevIoUs point to generate the new point using the recursion
    [x1[k+1],y1[k+1],z1[k+1],x2[k+1],y2[k+1],z2[k+1]]=num_rossler(x1[k],y1[k],z1[k],x2[k],y2[k],z2[k],t[k+1]-t[k],K,w2)

它的工作和解决。 X2(t+T)=X2 此处取自函数。 也许有人知道怎么写 S(T) 我会尝试将他添加函数中,但出错了。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。