See the excerpt from the C-Script help below.
Say you have a 3x3 matrix. If I'm understanding your question correctly, one could:
- Set the Number of Inputs field be "9". There will be one input port to the C-Script block. Access the matrix entries as InputSignal(0, 3*Row + Column)
- Set the Number of Inputs field be "[3, 3, 3]". The C-Script will have 3 input ports, each with three elements. Access the matrix entries as InputSignal(Row,Column)