Performance Problem with loop-code
이전 댓글 표시
Hello,
is there a possibility to increase the performance of the following MatLab program? It's really slow... 'A' describes a structured array with more than 100 fields. C and D are normal matrices.
Thanks a lot!
Best regard Philipp
T_dummy=12;
for k =1:numel(fields_A)
B_dummy = NaN(12,size(A.(fields_A{k}),1));
for c=1:size(A.(fields_A{k}),1)
for t=T_dummy-11:T_dummy
B_dummy(t-T_dummy+12,c) = C(t,A.(fields_A{k})(c,1)) + D(t,A.(fields_A{k})(c,2));
B.(['t_' int2str(k)]) = B_dummy;
end
end
T_dummy=T_dummy+1;
end
clear B_dummy T_Dummy
댓글 수: 1
per isakson
2012년 2월 17일
Did you try the profiler?
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!