Hi, everyone! I have a question about generating random meshgrid.
Show older comments
Firstly, I created a [x,y] meshgrid and plot it, then I added random amounts to the vertices of the mesh so that the shape of the mesh became random. Then I wanted to constrain the area of each small grid to be equal, but found that there were too many variables and too few constraints, making it difficult to proceed. Any better way to get what I want? Thank you guys! 

Accepted Answer
More Answers (1)
John D'Errico
on 28 Dec 2023
Edited: John D'Errico
on 28 Dec 2023
0 votes
Any better way? Sorry, but no. You want to generate a "randomly" perturbed mesh, but one where each cell has exactly equal area? UGH. As problems go, this one will be nasty in triplicate.
No easy solution. Not even a remotely viable solution.
4 Comments
chen yuqin
on 28 Dec 2023
John D'Errico
on 28 Dec 2023
You might decide to randomly perturb the mesh, then TRY to use iterative methods to further perturb the mesh. But don't be surprised if the solution found is one where the grid moves to one that us effectively the same one you started with, before perturbation. Or you might get out some other regular grid as a result, since that is also a trivial solution.
Image Analyst
on 28 Dec 2023
Why do they need to be equal areas? What is your next step, assuming you were able to achieve that? I'd like to determine if it's really necessary or not. Maybe having approximately the same area is good enough for what you want to do.
chen yuqin
on 28 Dec 2023
Categories
Find more on Creating and Concatenating Matrices 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!