I have set up a parfor loop and am receiving the following indexing problem:
Error using parallel_function (line 598)Subscripted assignment dimension mismatch.Error in Abel_Shell (line 17)parfor i = 1:len
This is my code:
len = length(phase(1,:));parfor i = 1:len line = phase(i,:); if max(line) > 1e-2 cen = round(trapz(xaxis.*line)/trapz(line)); lhs = fliplr(line(1:cen)); rhs = line(cen+1:length(line)); denlhs = Abel_DanSteve(lhs,pixel); denrhs = Abel_DanSteve(rhs,pixel); density(i,:) = [fliplr(denlhs), denrhs]; else density(i,:) = 0; endend
I have confirmed that len = 3000 at the start of the loop as expected. What could this be?
Thanks, Dan
Best Answer