Occurance of error "Undefined function 'mtimes' for input arguments of type 'cell' " in pdepe

1 view (last 30 days)
Hi, I am trying to solve a partial differential equation which is elliptic - depending upon x and r. Its general structure is like:- U1t = a(U1,x)*U2t + b(U,x)*U1xx; The U2t part is separate DE:- U2t = (1/r)*(r D(r)*U2r)r (Subscript here denote differentiating variable) I solved separately r-dependent PDE by using pdepe. Now I want to incorporate that solution in original PDE. I did it as following:-
%% Water Diffusion in fiber m = 1; %Indicates symmetry in the problem x = linspace(0,1.12*10^-5,501); t = linspace(0,400,801); u = pdepe(m,@petdiff, @petdiffinitial, @petdiffbc, x,t);
%% Incorporating fiber-diffusion in main PDE uf= (u*x')/(501*1.12*10^-5); crate = 30*uf*epsf; m = 0; x = linspace(0,1.12*10^-5,500); t = linspace(0,400,800); intsolve = pdepe(m, @pettfdiff, @pettwinit, @pettfbc, x, t);
The value of crate was used in definitions of main pde as follows
function [c, b, s] = pettfdiff(x,t,u,DuDx)
c = [rhoL; 1]; b = DuDx.*[rhoL*(1/tortul)*preDl*u(1); (1/tortug)*Dg];
s = [ (epsf + u(1))/(epsp)}*crate(2*t+1) (u(1)/epsp)^0.75)*((1-u(1) - epsf)/epsp)}*crate(2*t+1)];
When I run file to solve main pde. It gives error that " Undefined function 'mtimes' for input arguments of type 'cell'." This error is regarding use of 'crate'. Why matlab is giving this error. How can I resolve it? Any help is greatly aprreciated. Thanks in advance.
Pratik Patil

Answers (0)

Categories

Find more on Partial Differential Equation Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!