Hello, i am getting the following error for this loop.
Error using In (line 78) Error: The variable f in a parfor cannot be classified. See Parallel for Loops in MATLAB, "Overview".
parfor j = 1:size(lam,2); c(:,j) = fminunc(@(c) (chi1(c, K0_com)), cint, options); for i = 1:Steps*Steps f(i,j) = K0_com(:,i)'*c(:,j); f(i,j) = (f(i,j)>0)*f(i,j); end end
How can I fix this? I did not see any warning or error when I wrote this.
Best Answer