properties

Begins a properties block within a class definition.

Syntax

properties

properties(Access = [Public | Private])

Inputs

Example

Defining a new class named Circle that has both public and private properties.
classdef Shape < handle
             properties %default Access is public
                 radius
             end
              properties 
                 center_x
                 center_y
             end
             methods
                  function self=Shape(r)
                     self.radius = r;
                     self.center_x = 0.0;
                     self.center_y = 0.0;
                  end
             end
         end