필터 지우기
필터 지우기

use poisolv with numerical matrix for the right hand side

조회 수: 3 (최근 30일)
Luc Rébillout
Luc Rébillout 2015년 7월 30일
답변: Luc Rébillout 2015년 7월 30일
Hello,
I'm trying to solve a problem in a way that is very similar of the example given in the documentation : Poisson's Equation on Rectangular Domain Using a Fast Poisson Solver
My problem is very similar and I managed to complete all the steps but instead of an analytical expression (3*x.^2 in the example) for the forced term f I would like to use a numerical matrix obtained from experimental data.
I tried passing it to poisolv directly but I get an error 'Matrix dimensions must agree'.
How can I specify my own right-hand side of the equation matrix ?
Thank you for your help

답변 (1개)

Luc Rébillout
Luc Rébillout 2015년 7월 30일
I eventually found an answer myself. A function forcing(x,y) has to be written and whatever variable containing the numerical values has to be set as a global variable. Then the MxN numerical matrix has to be transformed into a NumberofNodes-1 array where each line is the value (or interpolated value) of the numerical data at each node.
HOWEVER : I still have difficulties to pass an array of numerical values as Neumann Boundary conditions.. any ideas ?

Community Treasure Hunt

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

Start Hunting!

Translated by