In parallel computing toolbox, I want to create an array of reduction variables. Is it possible?
m=3; n=5;b=zeros(m,2);parfor i=1:n a=[i i+1]; for j=1:m b(j,:)=b(j,:)+j*a; endend
I get this result Error: The variable b in a parfor cannot be classified. See Parallel for Loops in MATLAB, "Overview".
Is there a way to make this work?
Matt
Best Answer