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 comentario

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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 19 de Feb. de 2015

Comentada:

el 11 de Ag. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by