The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Event Object for Datacursormode
Replies: 7   Last Post: Dec 30, 2012 11:05 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nima Nikvand

Posts: 11
Registered: 12/30/12
Re: Event Object for Datacursormode
Posted: Dec 30, 2012 3:51 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi Matt,

I am getting an empty matrix as the output of my ancestor function, a simple code like this for example:

fig = figure(1);
y = sin(x);


is also returning p=[].

"Matt J" wrote in message <kbosk1$b1q$>...
> "Matt J" wrote in message <kbon7f$njj$>...
> > "Nima Nikvand" <> wrote in message <kboj05$ahe$>...
> > >
> > > function [txt,pos] = datatextbox(~,event_obj)
> > >
> > > and this works very well. However, I'd like to be able to get the output of my datatextbox function and I was wondering if I can some how call the function directly by passing the event_obj to it. I'd greatly appreciate your suggestions, or any other solutions to get the output arguments.

> > =============
> >
> > If you make datatextbox a nested function, every variable in its workspace will also be available in the workspace in which it is nested.

> You could also call setappdata from within datatextbox and store the txt,pos output data to the parent figure. Pass the figure handle to datatextbox using this syntax
> set(dcmObj,'UpdateFcn',{@datatextbox, ancestor(dcmObj,'figure')});
> Then use getappdata to pull it out later.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.