embodiment of the present invention provides an element wise attribute which may be utilized by the class designer to automate the process of implementing element wise methods in the class during the creation of a method for the class the class designer assigns the new method the element wise attribute with the element wise attribute the method is written as if it always takes and returns scalar objects if the method is passed object arrays the language processor notes the element wise attribute assigned to the method and performs an element wise operation on the array object the separate results from the performance of the element wise operation are concatenated into a single array result the element wise attribute can be used when the method follows the following rules all input values belonging to the class defining the method are either scalar or arrays of the same size all results that belong to the class defining the method are arrays of the same size as the input arrays and each element in all such resulting arrays is simply the element wise operation applied to the corresponding elements in the input arrays those skilled in the art will recognize that alternate rules may be applied to the use of the element wise attribute without departing from the scope of the present invention an exemplary rectangle class to which the element wise attribute is applied is set forth below classdef rectangle properties x 0 y 0 width 0 height 0 end methods elementwise true function expand r expansion expand expands the rectangle in all directions the input rectangle r is modified such that the rectangle gets.