Hi Abdul,
The third input to connect, which is the connection matrix, is incorrect. It should have two rows. Check the doc page for connect(), paticularly the section that describes the function inputs and the example with index-based connection, to learn more about how to specficy the connection matrix. After doing so, feel free to come back here with more questions and code if still having problems.
