RockPaperScissors

LizardSpock

Object-Oriented Matlab

| Comments

Mathworks Article on Object-Oriented programming for Matlab.

A quick example of the syntax:

classdef sads
  properties
    Name
    SampleRate
  end
  properties (Dependent)
    Frequency
  end
  methods
    %% Next function is the constructor
    function  obj=sads(Name, SampleRate)
  end
end

Similar to structures but can not arbitrarily add new fields by assigning values to them.

Mathworks top level, introduction to OO programming for matlab. Links to other Mathworks OO articles.

Comments