Code covered by the BSD License  

Highlights from
Introduction to Object-Oriented Programming in MATLAB(R) Webinar

image thumbnail

Introduction to Object-Oriented Programming in MATLAB(R) Webinar

by

 

09 Apr 2009 (Updated )

Files from the "Introduction to Object-Oriented Programming in MATLAB(R)" Webinar.

target
classdef target
  %TARGET Definition of all Targets
  %   This is a target class for sensor modelling

  % Copyright 2008 The MathWorks, Inc.

  properties
    AoA
    range
    signal
  end

  methods
    function newTarget = target(AoA, range, signal)
      if nargin == 3
        newTarget.AoA    = AoA    ;
        newTarget.range  = range  ;
        newTarget.signal = signal ;
      end
    end

    function identify(thisTarget)
      disp(['I am a friend, please don''t shoot. ', ...
        'I am arriving at ' num2str(thisTarget.range)]) ;
    end
  end
end

Contact us