%simualte cnn clear all; clc; close all; %just for sure options = odeset('RelTol',1.0E-0,'AbsTol', 1.0E-0,'MaxStep', 1.0E-0); Max_time = 50; A=[0 1.2 0; 0 2 0; 0 -1.2 0]; B=[0 0 0; 0 0 0; 0 0 0]; P.Z=0; P.A=reshape(A,1,9); P.B=reshape(B,1,9); P.Bounadry='Constant'; P.BounValue=0; P.SizeX=2; P.SizeY=1; P.Input=[0; 0]; InitState= [1.1 1.1]; [t,X] = ode45(@cell_equation_boundary,[0 Max_time],InitState,options,P); %show the image out=reshape(X,size(t,1),P.SizeX,P.SizeY); %cut off the border plot(t,out(:,1),'r',t,out(:,2),'b')