Info
This question is closed. Reopen it to edit or answer.
How do I extend a mesh or surf figure?
1 view (last 30 days)
Show older comments
Before you start reading the question, I would like to let you know that I got some great suggestion on this problem in this link.
It has been a while I am trying to solve this problem but without any notable progress! Any help would be appreciated.
In summary: I have several points on the upper half of a rotated ellipsoid which are non uniformly distributed. I need to plot the half part of this rotated ellipsoid. I used the griddata() function in matlab to find a set of uniformly distributed points of surface to be able to plot it by using the mesh() function. However, the problem is that I cannot get to a complete surface figure!!!
Please see the attached photos for a better understanding. I need to plot only the half surf, but I attached a figure with two sides just to be more clear which part of the half-surf is missing.
The points are the solutions of the following equation:
in which the variables are xv, yv, and zv.
I solved the equation by using the solve() function for zv. Then, I generated xv and yv variables by using the linspace() and meshgrid() functions, and calculated the corresponding zv variables by using subs() function.
Anyone have any ideas on how I can extend the surf to be complete? I tried several times to generate more points by solving the equation in several ways, but I could not get a satisfactory result. Also, I used some extrapolation functions in Matlab as scatteredInterpolant() with different methods linear and natural, but the output was something with many extra meshes.
Any ideas? I need extend the surf to be complete (actually, half of it).
4 Comments
Sargondjani
on 20 Sep 2021
It is not clear to me what you exactly want. I mean, if you choose your x and y points such that they contain the half-surface, it should be fine, no?
And why don't you:
- construct a uniformly spaced mesh for x and y
- solve for z (using an initial guess that ensures you get the upper solution) for each gridpoint
- plot x,y,z surface
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!