Thread Subject: urgent: selecting 3D points on figure

Subject: urgent: selecting 3D points on figure

From: Mahdieh

Date: 14 Oct, 2008 22:03:02

Message: 1 of 2

Hi everybody,

This problem has wasted my time for sometime now...
Any help would be appreciated ...
I plot a 3D dataset using plot3, and I want to be able to click on 7 different points on the figure...and access the xyz coordinates of those points in my workspace ...
I have tried, getpts, ginput, and played a bit with datacursor ...
The first two are for xy data and I can not get the z coordinate, and with the latter, I can not select several points ...

Any help would be appreciated ...
-Mahdieh

Subject: urgent: selecting 3D points on figure

From: Mahdieh

Date: 15 Oct, 2008 16:17:01

Message: 2 of 2

Hey,
I found it myself...
for selecting multiple cursor on my data, I keep down Alt ...
 and to access their coordinates I wrote the following:

>>dcm_obj = datacursormode(fig);
>>f = getCursorInfo(dcm_obj)
f =
1x3 struct array with fields:
    Target
    Position
    DataIndex
>> a = struct2cell(f);

Now the points are simply in a{2},a{5},a{8} ...
if three points are selected ...

-Mahdieh


"Mahdieh " <mahdieh.emrani@capitalhealth.ca> wrote in message <gd34um$e9s$1@fred.mathworks.com>...
> Hi everybody,
>
> This problem has wasted my time for sometime now...
> Any help would be appreciated ...
> I plot a 3D dataset using plot3, and I want to be able to click on 7 different points on the figure...and access the xyz coordinates of those points in my workspace ...
> I have tried, getpts, ginput, and played a bit with datacursor ...
> The first two are for xy data and I can not get the z coordinate, and with the latter, I can not select several points ...
>
> Any help would be appreciated ...
> -Mahdieh

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
3d points Mahdieh 14 Oct, 2008 18:05:06
ginput Mahdieh 14 Oct, 2008 18:05:06
rssFeed for this Thread

Contact us at files@mathworks.com