Find the turing pattern for following equation

22 次查看(过去 30 天)
the equation is
dx/dt={r/(1-ky) - r0-r1x-[alpha*(1-beta*y)*x]/[a+(1-beta*y)*x]}x
dy/dt={[new-cy/[a+(1-beta*y)*x]}*y
  2 个评论
John D'Errico
John D'Errico 2024-7-7
Since this is highly likely to be a homework asignment, what have you done? What effort have you made? If none, then we cannot help you. And we cannot do your homework anyway. Aanyway, your question is not a question about MATLAB, beyond asking us to write the code to solve your problem.
Abhay
Abhay 2024-7-7
i just wanted a turing code to solve a question so i asked a simple version to get an idea
If you know any other equation turing code please share it

请先登录,再进行评论。

采纳的回答

John D'Errico
John D'Errico 2024-7-7
编辑:John D'Errico 2024-7-7
I won't do your homework, since this is highly likely to be homework with no effort made on your part, just from the way you asked the question. However, since you ask for a example code, all you had to do was a direct search for "turing pattern MATLAB", and you would find this:
And there you will find a complete example of how to generate a Turing pattern, fully done in MATLAB.
  2 个评论
Abhay
Abhay 2024-7-11
i have tried something but i am unable to get the graph plotting can you help me with this
i will be attaching my code here
function hyhy(n)
n=100;
time=10000; d1=0.1; d2=4; tau=1; h=1/3;
r=3.5; r2=1; r1=0.5; alpha=2; a=0.3; mew=1; c=0.9;
beta=0.7; k=0.8; y=9.22;
a1=alpha*k*mew^2*beta^2;
a2=r1*k*c^2+alpha*mew^2*beta*(beta-2*k)-c*r2*mew*k*beta;
a3=c*r*mew*beta+c*r2*mew*(k-beta)+r1*c*(c-a*mew*k)-alpha*mew^2*(2*beta-k);
a4=mew*(c*r2+alpha*mew-c*r-c*r1*a);
R=roots([a1 a2 a3 a4]);
ii = 0;
for i=1:length(R)
if real(R(i))>0 && imag(R(i))<0.00001
ii = ii+1;
RR(ii) = R(i);
end
end
number_of_positive_equilibrium=length(RR);
p1=RR(2);
n1=(c*p1-mew*a)/(mew*(1-beta*p1));
u=n1+5*0.0001*rand(n,n); grad1=u*0;
v=p1+5*0.0001*rand(n,n); grad2=v*0;
for step=1:time
I = 2:n-1; J = 2:n-1;
grad1(I,J)= (u(I,J-1)+u(I,J+1)+u(I-1,J)+u(I+1,J)-4*u(I,J))/h^2;
grad2(I,J)= (v(I,J-1)+v(I,J+1)+v(I-1,J)+v(I+1,J)-4*v(I,J))/h^2;
u = u + tau * (d1 * grad1 + (r ./ (1 + k * v) - r2 - r1 * u - (alpha * (1 - beta * v) .* v) ./ (a + (1 - beta * v) .* u)) .* u);
v = v + tau * (d2 * grad2 + (mew - (c * v) ./ (a + (1 - beta * v) .* u) .* v) );
step;
end
pcolor(u);
shading interp;
colorbar;
colormap jet;
drawnow;
zoom(2);
axis off;
set(gcf, 'renderer', 'zbuffer');

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Colormaps 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by