simulation of program in matlab
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
...
0 Kommentare
Antworten (2)
Torsten
am 15 Jan. 2024
Verschoben: Torsten
am 15 Jan. 2024
M2_eq = 1;
D2_ov = 1e-2;
m=2;
x = linspace(0,1,100);
t = linspace(0,2,10);
u = pdepe(m,@(x,t,u,DuDx)eqn1(x,t,u,DuDx,D2_ov),@initail1,@(xl,ul,xr,ur,t)bc1(xl,ul,xr,ur,t,M2_eq),x,t);
surf(x,t,u)
function [c,f,s] = eqn1(x,t,u,DuDx,D2_ov)
c = 1;
f = D2_ov*DuDx;
s = 0;
end
%-----------------------------------------------------------------
function [pl,ql,pr,qr] = bc1(xl,ul,xr,ur,t,M2_eq)
pl=0;
ql=1;
pr=ur-M2_eq;
qr=0;
end
%-----------------------------------------------------------
function value=initail1(x)
value=0;
end
%------------------------------------------------------
0 Kommentare
Siehe auch
Kategorien
Mehr zu PDE Solvers finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!