Question: how do i solve the following problem in matlab

hi daer 

i am trying to run the following but error came 

acually the boundry conditions are periodic

x=linspace(0,1,50);
t=linspace(0,1,50);
m=0;
eqn=@(x,t,u,dudx)transistorPDE(x,t,u,dudx,C);
ic=@(x)transistorIC(x,C);
sol=pdepe((m,eqn,ic,transistorBC,x,t);
function [c,f,s]=transistorPDE(x,t,u,dudx,C)
a=0.1;
c=1;
f=0;
s=-a*dudx;
end
function u0=transistorIC(x,C)
L=1;
u0=exp(-(x-L/2)^2);
end
function [pl,ql,pr,qr]=transistorBC(xl,ul,xr,ur,t)
pl=ul;
ql=0;
pr=pl;
qr=0;
end
 

Please Wait...