I'd like to change my class properties with a method defined for that class:
classdef triangle<handle
properties
    a
    h         
end
methods
    function obj = triangle()
        obj;
    end
    function obj = setProps(obj, a, h)
        obj.a = a;
        obj.a = h;
    end
end
end
Calling:
t = triangle();
t.setProps(a, h);
It's not working at all - I get this error:
 The class 'handle' is not a super-class of class 'triangle', as required to invoke a super-class constructor or method.
 Error in triangle (line 13)
    function obj = triangle()
I'm using matlab 2012a. My code is based on this example: link
 
     
    