- Use interp2 to interpolate your given c values smoothly to c values everywhere in the plate. Specify a nonconstant c coefficient.
- Write a function that gives the c value for the closest point to each specified point. Again, you can use interp2 to do this, with the 'nearest' method.
The c coefficient for assempde found in a matrix of x,y values.
1 view (last 30 days)
Show older comments
Hi,
I am trying to solve an elliptic PDE problem. I have a plate with two conductors and would like to find the electric potential on the plate.
My problem is that the plate has different c coefficients depending on the location on the plate and they are not dependent on a function, but are found in a matrix containing the c values for each point on the plate.
Does anyone know how to go about solving this problem?
Thanks, Fridrik
0 Comments
Answers (1)
Alan Weiss
on 25 Aug 2015
Well, you don't have c values for every point in the plate, just some finite subset, or possibly the values are constant over small square regions or some such thing.
You can probably do one of several things, depending on what your model really is:
I was assuming that you had 3-D geometry. If you have 2-D geometry, change my suggestions to interp1.
Alan Weiss
MATLAB mathematical toolbox documentation
2 Comments
Alan Weiss
on 25 Aug 2015
Thank you for clarifying your question, I have a much better idea what you are doing now.
You say "I could do this by defining subdomains in the 2-D geometry but this is impossible with finer grids where the subdomains number a few hundreds." Well, if you have hundreds of subdomains with c coefficient values, you have to face the data management problem somewhere. I think that you might as well face it in a nonlinear c coefficient written in two-dimensional functional form. The t argument contains the subdomain number, and you can simply extract that number and evaluate the vector ccoef(t(4,:)), where ccoef(i) contains the c coefficient for subdomain i.
Alternatively, if the c coefficient varies as a known function of x and y, you can simply write it that way using two-dimensional functional form.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
See Also
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!