Although it is no longer documented, for backwards compatibility, if you pass extra arguments to pdepe(), then it attempts to pass those extra arguments to every function it invokes your your behalf.
You are passing the 9 extra arguments D, v, theta, rhob, kappaf, kappas, lambdaf, lambdas, [c0f;c0s] so your bcFunc and other functions that you pass in need to accept 9 extra input arguments besides what they normally take. So in the case of bcFunc which expects 5 inputs normally, the function handle you supply would have to accept 5+9 = 14 input arguments.
It is not recommended that you write any new code taking advantage of this old feature. There are already some subtle incompatibilities between it and some functions such as fmincon about what is expected to happen if you try to take advantage of leaving off some trailing inputs to the major function being invoked, but at the same time want to pass in extra inputs to the function handles.
The recommended approach is to instead parameterize your functions as needed, and not pass any extra arguments to pdepe using the undocumented feature.
You already have a good example of parameterization:
bcFunc=@(xl,ul,xr,ur,t) slowsorpbc(xl,ul,xr,ur,t,bctimes,bcVals);
That is a generally a good design.
Best Answer