Effacer les filtres
Effacer les filtres

Selecting an area with a mouse on a 3D Plot

5 vues (au cours des 30 derniers jours)
David Polcari
David Polcari le 4 Mar 2013
Hi everyone, I have what is perhaps a simple question. I have a 3D image (surf plot) that contain two peaks. What I would like to do is select just the area around the peak using my mouse. Then, I would like to be able to get certain information about this area. For example, I would like to know the average value of that area, the area under the curve, etc.
Specific Example: My x and y axes are simply x and y position and my z axis is the height. I want to select an area along x and y and then obtain the average value of z.
Thank you for any help!

Réponses (1)

Sean de Wolski
Sean de Wolski le 4 Mar 2013
The easiest way:
surf(peaks)
brush on
right click "Create Variable"
If you could get away with a contour plot or 2d surface (i.e. view(2))instead of a 3d surface plot that opens it up to many more options like using an imroi object etc. If the above doesn't work, please explain why so I can point you in a different direction.
  1 commentaire
David Polcari
David Polcari le 4 Mar 2013
Hi Sean, Thanks for the quick answer. First, I definitely cannot use a 2D plot in my case. I tried using what you suggested but it doesn't seem to work correctly. I'm not sure if I'm implementing it properly. My plot is shown, I entered brush on and selected my area. Then, right-click create variable. A new variable then shows up with is fine. However,the value within it are completely off. i have values such as 3e-6 but most values in this "new" variable are around 20. Any idea what I'm doing wrong?

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by