'Unittesting Matlab System Block

I want to develop some "Matlab System Blocks". For testing their functionality and debugging their code I would like to Unittest them. The method, that I want to test is the "stepImpl" method of the "Matlab System Block".

Unfortunately the "stepImpl" method is a protected method so I can't Unittest them. I know an alternative is to implement the method in other file as a public method or in the "Matlab System Block" as public Method and use this method in the "stepImpl" Method. I already tried to make the "stepImpl" Method public, but this gave me an error.

However I'm hoping for a better way of Unittesting the "Matlab System Block". Are their any best practises or guidelines?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source