Need help finding the z-coordinate of a 3D surface given a known x and y coordinate
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm having trouble figuring out how to extract the z-coordinate intersection from a 3D plot when the x and y coordinate are known. The x and y planes in the image bllow are drawn for reference only for x = 0.1 and y = 0.4. Note also that the z-surface is not a uniform plane but rather a surface with a slight bit of tilt/twist. In this example, when x = 0.1 and y = 0.4, the intersection is: z = 0.814. I was able to manually find the intersection via the plot tools (ie clicking data types, then clicking the point of interest on the plot) but I need to code up a function that will take an x and y input and then spit out the z-coordinate. Also, the functino needs to return "NaN" for an answer if looking for the Z-coordinate where the z-surface doesnt exist (see: upper left most section of the z-surface)
For an experienced Matlab user, this is probably very simple to do but I'm struggling with it and would really appreciate a little help.
Thank you!

0 commentaires
Réponses (1)
darova
le 22 Mar 2021
What about interp2? If (x,y) are known z coord can be found
z1 = interp2(x0,y0,z0,x1,y1);
0 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!