You have three minor problems and one major problem. In the addlistener and notify calls you need to make valuechange into a string 'valuechange'. You also need the callback in addlistener to be a function handle that takes two arguments:
addlistener(obj, 'valuechange', @(obj, evt)calc_sum(obj));
The major problem is that this is not the correct way to do what you are trying to do. The calc_sum callback will only be initiated when the event queue is flushed. This means that there is a period of time in which the class is in an intermediate state (i.e., obj.a+obj.b will not equal obj.sum). You should look into dependent properties. You could also have set.a and set.b call calc_sum directly.
Best Answer