isDoneImpl

Class: matlab.system.mixin.FiniteSource
Package: matlab.system.mixin

End-of-data flag

Syntax

status = isDoneImpl(obj)

Description

status = isDoneImpl(obj) indicates if an end-of-data condition has occurred. The isDone method should return false when data from a finite source has been exhausted, typically by having read and output all data from the source. You should also define the result of future reads from an exhausted source in the isDoneImpl method.

isDoneImpl is called by the isDone method.

    Note:   You must set Access = protected for this method.

Input Arguments

obj

System object™ handle

Output Arguments

status

Logical value, true or false, that indicates if an end-of-data condition has occurred or not, respectively.

Examples

expand all

Check for End-of-Data

Set up the isDoneImpl method in your class definition file so the isDone method checks whether the object has completed eight iterations.

methods (Access = protected)
   function bdone = isDoneImpl(obj)
      bdone = obj.NumIters==8;
   end
end
Was this topic helpful?