Index exceeds array bounds, when call a function with struct parameter
이전 댓글 표시
Hello every one,
Im trying to use Nested parfor and for-Loops, something like:
parfor n=1:2
s= struct();
s.x= [];
s.y= [];
s.z=[];
data=0;
for ii=1:5
for jj=1:10
[data,s(n)]= fun(data,s(n));
end
end
end
I couldn't solve the error of struct. where I can use s.x = fun(data,s(n)); on the other hand s(n)= fun(data,s(n)) is wrong syntax in parfor and I want to process all s fields.
it works when I use for loop, thanks in advance
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Functional Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!