problem with matlab when executing the same program twice?

9 visualizaciones (últimos 30 días)
Sarla
Sarla el 4 de Mayo de 2011
Comentada: Johnathan Faria el 18 de En. de 2021
i seem to be facing this weird problem when i try to run the same program in matlab, in succession. the first time i do it it gives me the answer within 30 seconds, and then when i try to run it again it just goes on and on. how is this possible? i have even used clear at the very top.

Respuesta aceptada

Jason Ross
Jason Ross el 4 de Mayo de 2011
Are you exhausting some resource the first time through that prevents the second run from using them? Examples might include but are not limited to memory, disk space, network connections, file handles, serial connections or communications ports.
Without more specifics (profiler output, what you are doing, example code, OS, version) it's very difficult to say where the problem may lie.
Also, does it go away when you restart MATLAB? When you restart the machine?
  5 comentarios
Sarla
Sarla el 6 de Mayo de 2011
ok thank you. i am trying that out right now.
Johnathan Faria
Johnathan Faria el 18 de En. de 2021
Hi guys, I'm with the same issue, I'm working with a Kalman Filter code and i just can run the code once, I've tried the things above, but didnt worked!

Iniciar sesión para comentar.

Más respuestas (2)

Jan
Jan el 4 de Mayo de 2011
Use the command "profile" to see, where the time is lost in the 2nd run.

Robert Cumming
Robert Cumming el 5 de Mayo de 2011
are you using a mex function or a dll? If so it could be that one of those has a memory leak? Meaning that clear all is nto actually clearing everything...

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by