How to solve 1D PDE's of 2nd order using PDE Toolbox (solvepde)? Or should I use pdepe (or another function) instead?
4 views (last 30 days)
Show older comments
I need to solve following equations:
Poisson equation in 1D:
d^2 fi / dx^2 = -rho(x), where rho is an array of values for each node on grid.
Equation in 1D:
d^2 A / dx^2 + mu(x)*A = -F(x), where mu and F are arrays of values for each node on grid.
Every example I found for these cases are either 2D and 3D or considering rho, mu and F as constant values. My problem is to find potentials on grid, knowing rho, mu and f on this grid.
Or maybe I simply using wrong function for this problem?
Don't hesitate to ask clarifying questions.
Thanks in advance!
0 Comments
Answers (1)
Ravi Kumar
on 14 Feb 2018
I think pdepe should work for you. Check out the Example 2 in the documentation page. Note that in this example, source term, F, is not constant as in your case.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!