简体   繁体   English

FreeMat替代MatLab的findobj()

[英]FreeMat alternative to MatLab's findobj()

Is there an equivalent function in FreeMat? FreeMat中有等效功能吗? I can't seem to find one and the documentation is poorly organised. 我似乎找不到一个,而且文档组织得不好。

Any recommendations for work-arounds? 有任何解决方法的建议吗?

I am not sure if that helps, but I am not using this function in Matlab either. 我不确定是否有帮助,但是我也没有在Matlab中使用此功能。 I always organise my objects in a list that is either stored in a global workspace or passed around other to objects. 我总是将对象组织在一个列表中,该列表存储在全局工作区中,或围绕其他对象传递给对象。 So what you could do is create an Object like a list that has a search and add function. 因此,您可以做的是创建一个像对象一样具有搜索和添加功能的对象。 Put it in global scope and make it a singleton (I know, friends don't let friends write singletons). 将其放到全局范围内并使其成为单例(我知道,朋友不要让朋友写单例)。 This way you can find all you add to this list easily. 这样,您可以轻松找到添加到此列表的所有内容。

You might want to check out the "service locator" pattern: https://en.wikipedia.org/wiki/Service_locator_pattern 您可能想查看“服务定位器”模式: https : //en.wikipedia.org/wiki/Service_locator_pattern

I think the findobj() function in MATLAB does someting similar. 我认为MATLAB中的findobj()函数具有类似的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM