title: Operating on Superclass Property with Subclass
body: <p>To all,</p>
  
  <p>I'm a novice programmer (I haven't taken a structured course) trying to pick up MATLAB. Currently, I'm trying to understand MATLAB's object-oriented programming tools. I want to cleanly divide up my project in the steps below. I would like to inherit the substantiated <code>data</code> and work on it in <code>validate</code>. I'm running into this error <code>You cannot set the read-only property 'data' of validations.</code></p>
  
  <p>How would I go about doing this? Would this be the appropriate way to organize myself in MATLAB?</p>
  
  <pre><code>classdef formatData.m 
      properties
          data = []
      end
      methods
          function formatData(data)
          % This should initialize the data
          end
          function columnShift(data)
          % Simple changes
          end
      end
  end
  
  
  classdef validateData.m &lt; formatData
      properties
          error = logical(false)
      end
      methods
          function validateData(data)
              if nargin &gt; 0
                  obj.data = obj@formatData;
              end
          end
          function checkValues()
          % check values on data from formatData
          end
      end
  end
  </code></pre>