Saving profile information in a loop
이전 댓글 표시
I am running many iterations of a piece of code and I want to save the profile information from each iteration separately but it saves to the working directory or the directory typed as the last argument in the profsave. I attempted to input a string constructed using the iteration data but the function seems incapable of handling anything not in the form of profsave (information,'filename'). The 'filename' part will not work if I place the string variable there without the apostrophes flanking it and when they are there the function names the output the name of the string.
On a side note this is not a problem with the save() function which I used in the same program to record the workspace variables.
답변 (1개)
Walter Roberson
2015년 6월 10일
for K = 1 : 5
dirname = sprintf('profile_iteration_%3d', K);
profsave(information, dirname);
end
카테고리
도움말 센터 및 File Exchange에서 Profile and Improve Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!