how can i solve this proplem by rung-kutta method ?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/195836/image.png)
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu PDE Solvers finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!