Coefficients for system of differential equations in pdetool

3 次查看(过去 30 天)
Dear people,
I have been struggling several days with Matlab and digging in the documentation to solve this system of parabolic equations.
du(1)/dt - div (c1* grad(u(1))) + (u(2)-u(1))*u(1) = 0
du(2)/dt - div (grad(u(2))) + u(1)*u(2) = 0
du(2)/dt = u(1)*u(2)
My solution now is
d = 1;
c = [c1;1;0];
a = char('u(2)-u(1)','u(1)','0');
f = char('0','0','u(1)*u(2)');
and
u = parabolic(u0,tlist,b,p,e,t,c,a,f,d);
The solver gets a solution, but it is not what it should be. I wonder if I am not defining c,a, and f correctly. Any suggestion?

回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by