How can I clear variables in a parallel for loop efficiently?
이전 댓글 표시
In order to maintain low memory usage in my code, I need to delete variables used inside of a parallel process. One could manually assign each variable "[ ]", but I am looking for a simpler method that can deal with variables in bulk. Using "parfor" on nested loops allows the use of "clearvars", but significantly increases computation time. Any help would be appreciated.
댓글 수: 2
David Hill
2022년 11월 29일
If the sizes will stay the same, why not just write over them?
Jordan Peper
2022년 11월 29일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Whos에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!