I have the parallel computing toolbox but I have trouble writing loops in a manner that the toolbox likes. Can someone make a suggestion as to how I can change this code so that I can run parfor on my for loops? When I try to run the loop replacing for with parfor I get the message that I can't do so because of how d is used.
Thanks a lot, Brian
d={}; for r = 1:length(c); for i = 3:100 d((r-1)*97 + i-2,1) = c(r,1); d((r-1)*97 + i-2,2) = c(r,2); d((r-1)*97 + i-2,3) = c(r,i); d((r-1)*97 + i-2,4) = cellstr(['F' num2str(i)-2]); end disp(r); end
Best Answer