How to make a rectangular shape with inner boundary having the value of 1 and outer boundary a value of 0?
Show older comments
Hi,
I am trying to make a rectangular shape with inner boundary value set as one and outer boundary value set as zero. Ideally a smoother transition from inner boundary to put boundary would be really helpful for my case. Following figure can explain the problem better:

In my implementation, I am struggling with the corners in particular with a linear transition from inner to outer boundary.

Following line should run the function to reproduce the the results of figure 2:
jQvals(Trow,Tcol,ouc,our,inc,inr,ptAbvCrk,ptBlwCrk,gridElems);
Relevant variable are in the attached mat file.
Looking forward to the feedback.
3 Comments
Matt J
on 20 Dec 2021
I am trying to make a rectangular shape with inner boundary value set as zero and outer boundary value set as one
In your figure illustrations, it's the other way around (inner boundary=1)
waqas
on 20 Dec 2021
Matt J
on 20 Dec 2021
Very good. Then see my answer below.
Accepted Answer
More Answers (0)
Categories
Find more on Programming 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!

