linking properties in object oriented code
显示 更早的评论
I have an object oriented code where I want to be able to link several properties in several manners. e.g. "these properties are always equal", "these properties maintain a ratio of 5" etc. these are not properites of the same object, and sometimes not of objects from the same class.
I was thinking of using linkprop but it is not recommended for objects other than graphic objects. also to the best of my knowledge it can only link properties as equal.
I was thinking of adding postset listeners to the properties where the callback function changes the other properties accordingly, but I am not sure how to prevent recursive calling. i.e one function changes the other property changing the first one etc.
would be thankfull for any assistance
Nathan
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!