How to solve 1D PDE's of 2nd order using PDE Toolbox (solvepde)? Or should I use pdepe (or another function) instead?
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Ravi Kumar
2018년 2월 14일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!