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

1 view (last 30 days)
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?

Answers (0)

Categories

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!