Is there a 'self' to refer own struct in MATLAB?
I'm grouping a set of anonymous functions into a structure and some
variables within that structure. Is there a way to refer 'self', i.e, own
structure? What I'd like to accomplish is to have a function returns some
values based on the member variables. For simplicity, say I have a struct
a, where
a.value_1 = 3;
a.value_2 = 2;
a.sum = @()(self.value_1 + self.value_2)
Is there something like that possible in MATLAB?
No comments:
Post a Comment