Is it possible to attach a function to a class property of type struct? Intended usage:
% Definition:
classdef a < handle
properties
bar
end
methods
function obj = a()
obj.bar = struct;
%obj.bar.attachFunction('apply', @someFunction); <-- something like this
end
end
end
% Usage:
foo = a();
foo.bar.apply('test');
foo.bar.var1 = 1;
foo.bar.var2 = 2;
Oh well, that was actually quite simply once I used my mind.