how can i solve this proplem by rung-kutta method ?
1 view (last 30 days)
Show older comments
this is my sol form
x = linspace(0,1,20);
t = linspace(0,2,5);
function [c,f,s] = pdex1pde(x,t,T,DuDx);
c = 1;
f = DTDx-4;
s = 0;
end;
function u0 = pdex1ic(x)
u0 = 0;
end;
function [pl,ql;pr;qr] = pdex1bc(xl,ul,xr,ur,t);
T0 = 418.5;
pl = Tl;
ql = 0;
pr = 1;
qr = 1;
end;
m = 1;
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
u = sol(:,:,1);
surf(x,t,T);
title('Numerical solution computed with 20 mesh points');
xlabel('شDistance x');
ylabel('Time t');
figure;
plot(x,T(end,:));
title('Solution at t = 2');
xlabel('Distance x');
ylabel('T(x,2)');
0 Comments
Answers (0)
See Also
Categories
Find more on PDE Solvers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!