How can I overload the subsref method for the struct class?

1 次查看(过去 30 天)
I want to overload the subsref method for the struct class, to extend it with regular expression fieldname matching. I can create a subsref function in a @struct folder in my matlab path, which is indeed called when I use subsref(variable,... on a variable of class struct. But it is bypassed somehow when is use the common syntax variable.(... It looks like Matlab does not call the subsref method for structures, but handles it by some built-in mechanism. How can I achieve the "structVariable.fieldName" construction to call my own subsref method?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by