Hi,
I am trying to implement parallel computing in MATLAB. The following code works,
A = zeros(10,5);for k = 2:10 parfor i =1:5 A(k,i) = 1; endend
However, if I change it a little,
A = zeros(10,5);for k = 2:10 parfor i =1:5 A(k-1,i) = 1; endend
an error returns
Error using parallel_computing_test (line 5)
Error: The variable A in a parfor cannot be classified.
See Parallel for Loops in MATLAB, "Solve Variable Classification Issues in parfor-Loops".
I already read the document, but I still do not understand what the problem is. Can anybody please help me?
Thank you in advance.
Best Answer