Hi I am trying to solve the equations du/dt=-a1*u + f(u,v), dv/dt=-a2*v + g(u,v)
For simplicity, I now just take f and g as scalars
However I get the error message
Error using .* Matrix dimensions must agree.
Error in pdeasma (line 9) aod=a.*ar/12; % Off diagonal element
Error in assema (line 189) km1=pdeasma(it1,it2,it3,np,ar,x,y,sd,u,ux,uy,time,a(k,:));
Error in parabolic (line 84) [unused,MM]=assema(p,t,0,d,f,time);
Error in twoDpdex4 (line 26) u1=parabolic(u0,tlist,'squareb1',p,e,t,c,a,f,d);
The code is
c=zeros(2,2,2,2);
a=[-a1 0; 0 -a2];
d=[1 0; 0 1];
f=[1;2];
[p,e,t]=initmesh('squareg');
u0=zeros(size(p,2),2);
ix=find(sqrt(p(1,:).^2+p(2,:).^2)<0.4);
u0(ix,1)=0.1*ones(size(ix));
u0(ix,2)=0.2*ones(size(ix));
tlist=linspace(0,0.05,10);
u1=parabolic(u0,tlist,'squareb1',p,e,t,c,a,f,d);
Thank you in advance for your help and advice
Best Answer