MATLAB: How to determine the number of inputs of block simulink from the command line

number of inputssimulink block

I want to determine the number of inputs of block simulink. How to do it?

Best Answer

click on the Simulink block/Subsystem for which you have to find the inputs and then use the following commands
a = get_param(gcb,'PortHandles');
length(a.Inport)