how can i solve this proplem by rung-kutta method ?

조회 수: 1 (최근 30일)
Mohammad Adeeb
Mohammad Adeeb 2018년 11월 20일
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개)

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by