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.
or
Index exceeds matrix dimensions.
Error in optimal (line 681)
welf=results(ires,1:5);

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