Error when generating a profile
이전 댓글 표시
I have used the profile feature of Matlab before whilst helping researchers optimise Matlab code. I am currntly getting this error when I try and save the profile information:
Subscript indices must either be real positive integers or logicals.
Error in profview>makefilepage (line 1245)
canRunList =
find(linelist(startLine:endLine)==runnableLines(startLine:endLine)) +
startLine - 1;
Error in profview (line 70)
s = makefilepage(profileInfo,idx, busyLineSortKeyStr2Num(busyLineSortKey));
Error in profsave (line 42)
str = profview(n,profInfo);
Error in main_n (line 10)
profsave(profile('info'),'myprofile_results');
The way I am generating the profile is:
clear all;
POOL = parpool('local',6)
profile on
saeedGPHtestAOopendseqrev2short27jan
profile off
profsave(profile('info'),'myprofile_results');
delete(POOL)
The code inside saeedGPHtestAOopendseqrev2short27jan which is the actual code I am profiling is quite large and belongs to someone else so I am currently not able to post the example code but would hope an error message would be able to point me in the right direction when it comes to fixing it.
Is this something I am doing wrong or some other issue with the code I am using?
Any help appreciated.
댓글 수: 1
Christian Dorion
2015년 8월 11일
I am running into the same error ("Subscript indices must either be real positive integers or logicals.") with a completely different script.
If I set a conditional breakpoint before calling profsave:
dbstop in profview at 1133 if startLine==0
Then
fcnIdx =
1
and
strc =
type: 'script'
name: 'symengine'
fullname: 'symengine'
functionPrefix: 'symengine>'
firstline: 0
lastline: 0
linemask: 0
calls: []
typeForTesting: [1x1 internal.matlab.codetools.reports.matlabType.Script]
calllines: []
so that startLine==0, which clearly is the cause of the error.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!