Number of instances of a resource
Create a servo object, and get a count of resources.
Create a servo object.
arduinoObj = arduino(); s = servo (arduinoObj, 'D2');
Check the current resource count.
arduinoObj = obj.Parent; count = getResourceCount(arduinoObj,'servo')
count = 1
resourceName— Name of the resource
Name of resource to count, specified as a character vector.
count— Number of resource instances
Number of instances for a given resource, returned as a double.