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

2 Ansichten (letzte 30 Tage)
J-G van der Toorn
J-G van der Toorn am 29 Okt. 2015
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?

Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by