How can I input values from a matrix in pdepe function of MATLAB?

2 views (last 30 days)
I have been using a pdepe function to solve the Fick's 2nd Law of Diffusion in 1D space and time. The values of the diffusion coefficient changes after each iteration and is a function of (x,t). How can I input a particular element from the diffusivity matrix in the pdepe function so that that the function returns the value of the concentration of a specie at that particular element i.e. if we input D(1,4), how to get the result as C(1,4)?
What is happening right now is that pdepe solves for all C(x,t) using all values of D(x,t) i.e. running for all values of D(x,t) at each value of (x,t).
  5 Comments
Torsten
Torsten on 27 May 2015
In the routine where you supply your pde (pdeex1pde, e.g.), you are asked to return the diffusion coefficient at one special point, namely at (x,t). So it's still not clear for me what exactly you are asking for.
Best wishes
Torsten.

Sign in to comment.

Answers (0)

Categories

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

Community Treasure Hunt

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

Start Hunting!