Main Content

Test System Object onMATLABCommand Line

Before importing the System object™ to Simulink®, it is recommended that you check the operation of the System object in the MATLAB®command line.

  1. Create an instance of theDigitalWriteclass.

    dw = DigitalWrite()
  2. Execute thestepImplmethod

    step(dw,1)
  3. Remove thedwsystem object and test thereleaseImplmethod.

    cleardw

Validating the behavior of the System object at the MATLAB command line helps to identify potential issues or errors in the code. These issues or errors become harder to isolate when the System object is used in aMATLAB Systemblock.

In the next section, you willCreate the MATLAB System Block.

See Also

||