Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
Matt J

Posts: 4,992
Registered: 11/28/09
Re: Event Object for Datacursormode
Posted: Dec 30, 2012 2:17 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Nima Nikvand" <nnikvand@uwaterloo.ca> wrote in message <kbonu5$ppk$1@newscl01ah.mathworks.com>...
> Hi Matt,
>
> Thank you for your reply. Can you please give me an example of how to make it into a nested function? much appreciated.


Run the following to get the general idea.

function test


txtCopy=[];
posCopy=[];


datatextbox(2,1);

txtCopy, %3
posCopy, %1

datatextbox(4,4);

txtCopy, %8
posCopy, %0



function [txt,pos] = datatextbox(a,b)

txt=a+b;
pos=a-b;

txtCopy=txt;
posCopy=pos;


end


end



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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.