Matlab "save" and saving memory
조회 수: 6 (최근 30일)
이전 댓글 표시
For example, I'm trying to run a program, and since I'm having a while-loop in that program where in each iteration a new empty matrix will be created, the program takes a long time to get the results and since an image has to be read many times no result is returned and matlab freezes. A workaround I was recommended to do is using `save` in `matlab`.
A question here is, how can `save` fix me that issue which seemed to be complex at the beginning? What is it really doing behind the scenes to improve the performance like that?
I saw the documentation about what `save` does, but still, not getting the point of the secret of the performance improvement?
Can you kindly explain to me what is really happening there?
Thanks.
댓글 수: 2
Image Analyst
2013년 3월 3일
I was going to ask you the same thing. I still don't know why you can just put save() in the loop. What's the problem? (In more detail please, like some code...) http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
Jan
2013년 3월 4일
@med-sweng: It is not clear what you are asking for, because we do not know the program. The only information we have is that it contains a WHILE loop and an empty matrix is created. Please post any relevant information, e.g. the code itself would be really helpful.
답변 (0개)
참고 항목
카테고리
Help Center 및 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!