Parfor indexing problem (Subscripted assignment dimension mismatch)
이전 댓글 표시
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;
end
end
I have confirmed that len = 3000 at the start of the loop as expected. What could this be?
Thanks, Dan
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!