From: Yair Altman on 16 May 2010 01:29 "Yair Altman" <altmanyDEL(a)gmailDEL.comDEL> wrote: [snip] > % Loop over all figure descendants > c = findobj(get(fig,'Children'),varargin{:}); [snip] Correction: use findall() rather than findobj() above > An alternative to overobj or overobj2 is to use the undocumented hittest built-in function – separate cases may dictate preferring one alternative to the other: > hObj = hittest(hFig); Using hittest() may still be the fastest and best approach. Yair Altman http://UndocumentedMatlab.com
From: Yair Altman on 17 May 2010 03:17 "Nick Stokes" <nickstokes5(a)gmail.com> wrote in message > Thanks! This was worth a try and I did. To my surprise, it was actually really good! I posted a sample if anyone wants to give it a try: > > http://code-bin.homedns.org/649 Why not post it to the Matlab File Exchange? http://www.mathworks.com/matlabcentral/fileexchange/ - it could be an interesting addition. Yair Altman http://UndocumentedMatlab.com p.s. - you have used a setbehavior() function in your code. You're probably not aware that this is a built-in undocumented function that is used for other purposes by internal Matlab code, and might interfere with that code executing if you override the function as you did. Therefore, you may wish to change this function's name in your code
From: Nick Stokes on 17 May 2010 10:32 "Yair Altman" <altmanyDEL(a)gmailDEL.comDEL> wrote in message <hsqqhk$3qm$1(a)fred.mathworks.com>... > "Nick Stokes" <nickstokes5(a)gmail.com> wrote in message > > > Thanks! This was worth a try and I did. To my surprise, it was actually really good! I posted a sample if anyone wants to give it a try: > > > > http://code-bin.homedns.org/649 > > > Why not post it to the Matlab File Exchange? http://www.mathworks.com/matlabcentral/fileexchange/ - it could be an interesting addition. Actually I did that initially; but go the notice "it will take 5 days to approve" or something like that. I still can't even see the file any longer in my submission list. > > p.s. - you have used a setbehavior() function in your code. You're probably not aware that this is a built-in undocumented function that is used for other purposes by internal Matlab code, and might interfere with that code executing if you override the function as you did. Therefore, you may wish to change this function's name in your code Yes I wasn't aware, and am still not: I am on 7.9.0 and `which setbehavior` gives not found. Could it be part of a package? anyhow..
From: Steven Lord on 17 May 2010 13:32 "Nick Stokes" <nickstokes5(a)gmail.com> wrote in message news:hskjnl$hkp$1(a)fred.mathworks.com... > dpb <none(a)non.net> wrote in message > <hskiu8$d9b$2(a)news.eternal-september.org>... > >> >> OK, I'll do so instead... :) >> >> Have you considered it just simply may not be possible to a user app in >> Matlab > > Yes, thanks! That would be an answer indeed.. Unfortunate, but an answer > nevertheless. >> and that ML internals are available to ML itself in an obviously much >> more intimate manner than at the m-file level? >> > > But is that /really/ the case? Isn't there even an undocumented, > unsupported, low-level, platform-specific way? Doug pointed you to OVEROBJ, which is an undocumented and unsupported way to do something close to what you want. You're welcome to make a copy of overobj.m and tweak it to suit your needs better. I'd also like to suggest that perhaps you should contact Technical Support and explain specifically what you're trying to do that requires this functionality, so that they can tell you if there's a way to do what you want (I'm not sure if there is or is not) and if not they can capture it as an enhancement request (with your use case attached as motivation.) You can contact Technical Support using the Contact Us link at the top of http://www.mathworks.com. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: us on 17 May 2010 13:49
"Nick Stokes" > Thanks! This was worth a try and I did. To my surprise, it was actually really good! I posted a sample if anyone wants to give it a try: > > http://code-bin.homedns.org/649 well... i see you used the robot-idea after all... us |