Main Content


Class: matlab.system.mixin.FiniteSource
Namespace: matlab.system.mixin

End-of-data flag


status = isDoneImpl(obj)


status = isDoneImpl(obj) specifies whether the end of the data has been reached. isDoneImpl should return true 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.

Run-Time Details

isDoneImpl is called by the isDone object function.

Method Authoring Tips

You must set Access = protected for this method.

Input Arguments

expand all

System object handle used to access properties, states, and methods specific to the object. If your isDoneImpl method does not use the object, you can replace this input with ~.

Output Arguments

expand all

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


expand all

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;