This error occured when you tried to use index into an array indices those are not positive integers
for p_IC1 = -3e5:0
I have no idea what problems you are dealing , try to make positive indices, For more visit documentation check here
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!