I tired a simple MATLAB programming. u(j,i) is a Matrix in this case. But the code resulted in the following error.
Problem1 : Subscript indices must either be real positive integers or logicals.
Error in Problem1 (line 73) u(j,i)= (psi(j,i+1)-psi(j,i-1))*0.25;
Kindly help to solve this.