handles to subfunctions?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Walter Roberson
el 11 de Abr. de 2012
Editada: Walter Roberson
el 1 de Dic. de 2016
In R2010b, I find that the Dependency Analyzer gives me warnings about not being able to find various routines; the routines it reports are subfunctions whose handle I am taking. For example,
uicontrol(...., 'Callback', @MyCallback)
then if MyCallback is a subfunction in the same file, the analyzer reports it as not found.
"At the time you create a function handle, the function you specify must be on the MATLAB path and in the current scope of the code creating the handle. For example, you can create a handle to a subfunction as long as you do so from within the file that defines that subfunction."
This seems to specifically allow the construct that the analyzer is having problems with.
R2008b's Dependency Analyzer correctly reports the routines as subfunctions.
Is this just a bug in R2010b's Dependency Analyzer, or is there a change in functionality at stake?
0 comentarios
Respuesta aceptada
Titus Edelhofer
el 12 de Abr. de 2012
Hi Walter,
interesting observation. It persists in R2012a. On first glance I would agree this should be caught by dependency analysis. I will contact our development to see what's going on.
Thanks,
Titus
0 comentarios
Más respuestas (1)
Richard Brown
el 11 de Abr. de 2012
The report does not list:
...
Files called from eval, evalc, run, load, function handles, and callbacks. MATLAB does not resolve these files until run time, and therefore the Dependency Report cannot discover them.
2 comentarios
Richard Brown
el 11 de Abr. de 2012
I agree - function handles to subfunctions are entirely unambiguous
Ver también
Categorías
Más información sobre Whos en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!