i am using pdepe to solve a coupled PDE.
m = 0; x = linspace(0,1,20); t = linspace(0,2,5);
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
u = sol(:,:,1);
% A surface plot is often a good way to study a solution.
title('Numerical solution computed with 20 mesh points.')
% A solution profile can also be illuminating.
title('Solution at t = 2')
The boundary and initial conditions are saved in another two separate files files as below
function u0 = pdex1ic(x)
u0 = sin(pi*x);
function [c,f,s] = pdex1pde(x,t,u,DuDx)
c = pi^2;
f = DuDx;
s = 0;
My question is I want to plot c,f,s. How can i call them in the mail finction. I try to call like [c] = pdex1pde(x,t,u,DuDx); in the main functon but it says me undefine DuDx.?
Any help appriciated.