MATLAB: Subscript that is out of range

matrix arraymatrix manipulationout of range issuesimulink

I tried to simulate matrix equations with simulink but "subscript is out of range" error display. Anyone pls fix it.
attachment : simulink file

Best Answer

Hello Rajeev,
The variable "P" is undefined in your Fcn block.
Define the value of the variable "P".
Regards,
stozaki