Optimal Policy for macroprudential rule

my code show me this error and i can’t correct it!!optimal.mod (12.0 KB)
Error using reshape
To RESHAPE the number of elements must not change.
Index exceeds matrix dimensions.
Error in optimal (line 681)

You did not provide all files to run your code. You are loading an X