Reputation: 23
when working with objects in Matlab I constantly have to type
"obj.x, obj.y"
Is there a way to automatically set my matlab functions to apply the obj. reference, so I can just type x and y.
currently i must type as follows:
z = function(obj) z=obj.x+obj.y
i would like to type z = function(obj) z=x+y
Upvotes: 1
Views: 39
Reputation: 23858
No. Sorry; this is just how Matlab works; object references are always explicit.
Upvotes: 1