in matlab 2019a, profiler does not work correctly

I just installed MATLAB 2019a and it seem that the profiler does not work correctly!
I am using matlab as academic user with academic licence, when I want to profile my code, I click Run and Time in the Code section On the Home tab, but after the code is finished, I get nothing but the total time in the profile summary like below:
微信截图_20190707104647.png
is it a bug or something has changed? please help me!

1 comentario

Adam Danz
Adam Danz el 2 de Ag. de 2019
Editada: Adam Danz el 2 de Ag. de 2019
XiaoJuan Tian's answer moved here as comment.
I also want to ask this question!

Iniciar sesión para comentar.

 Respuesta aceptada

Eric.N
Eric.N el 23 de Ag. de 2019

5 votos

This is in fact a system font problem. Probably due to the font default setting for chinese version.
Please set in preferences-> Font->Custom, the font for "Profiler" as "Desktop code" or any other available custom font. Then your problem will be solved. Good Lucky!

4 comentarios

zhizhuo
zhizhuo el 23 de Ag. de 2019
Thank you Eric, if I install matlab 2019a again in the future, I will try your solution! Thank you all the same!
fudong
fudong el 1 de Sept. de 2019
Good! It works on my matlab2019a.
zhizhuo
zhizhuo el 17 de Sept. de 2019
It also works well for me. Thank you very much Eric!
zexi wang
zexi wang el 13 de Jun. de 2020
Thanks very much, it works really fine!!! I can't find any answer searching by Chinese LOL

Iniciar sesión para comentar.

Más respuestas (1)

Adam Danz
Adam Danz el 9 de Jul. de 2019
Editada: Adam Danz el 2 de Ag. de 2019
It works fine for me (r2019a) when I time the following two lines.
t = randi(1000,60,1);
plot(1:60,t, 'o')
If the "Run and Time" button is not responding as expected, try running the profiler manually like this.
profile on
% < run your code >
profile viewer % This produces the report
profile off
If that doesn't work, try running the undocumented detail flag. (Thanks to Jan's answer here).
profile('on', '-detail', 'builtin')

8 comentarios

Stephen23
Stephen23 el 10 de Jul. de 2019
Editada: Stephen23 el 10 de Jul. de 2019
Note that according to the profile documentation the viewer option stops the profiler, so the off option afterwards is not required.
zhizhuo
zhizhuo el 14 de Jul. de 2019
Thanks Adam, I have reboot my PC and tried several times, both your method "profile on... profile viewer" and the method "Run and Time in the Code section" do not work correctly,the profiler just gives me the total time without code analysis, just like I mentioned in the question. Thank you all the same.
It really confuses me!
Adam Danz
Adam Danz el 15 de Jul. de 2019
What are you timing? If it's a custom function, could you attach it along with some example inputs?
Thank you Adam, I have tried some different code file, even using your advise:
t = randi(1000,60,1);
plot(1:60,t, 'o')
the profiler also does not work correctly, only the total time is present, no code analysis.
I think it is not related to the specific code for the abnormal profiler.
P.S. I have also installed MATLAB 2016B in my PC, I am not sure if they're not compatible.
Thank you again!
Adam Danz
Adam Danz el 2 de Ag. de 2019
Editada: Adam Danz el 2 de Ag. de 2019
I just tested it in r2016b and I see the full profile summary. I updated my answer with another suggestion at the bottom.
Thank you! I have tried the updated method :
profile('on', '-detail', 'builtin')
but it does not solve my problem.
I have reinstalled the MATLAB2018b, everything goes well!
Thank you Adam!
Adam Danz
Adam Danz el 3 de Ag. de 2019
Glad the reinstall worked!
Adam Danz
Adam Danz el 17 de Sept. de 2019
update: I un-accepted my answer and will accept Eric's answer since it seems to fix the problem for several people.

Iniciar sesión para comentar.

Categorías

Productos

Preguntada:

el 7 de Jul. de 2019

Comentada:

el 13 de Jun. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by