From: Shu Heng Khor on
Original Serial Code:
for j=2:n
w( 2:n, j)=0.25*(w_old( 1:n-1 , j )+w_old( 3:n+1, j )+w_old( 2:n, j-1)+w_old( 2:n ,j+1));
end
end

I attempted to parallellize it using
for j=2:n
parfor i=2:n
w(i,j)=0.25*(w_old(i-1,j)+w_old(i+1,j)+w_old(i,j-1)+w_old(i,j+1));
end
end

I started matlabpool, and run the function. The serial version works, but the parallel version fail to display any result at all. May I know if parfor loop is properly used in this case? If not, how should i change it?