Borrar filtros
Borrar filtros

How to deal with corrupted matlabprefs?

102 visualizaciones (últimos 30 días)
LucasBar
LucasBar el 19 de Ag. de 2024 a las 16:55
Comentada: LucasBar el 23 de Ag. de 2024 a las 16:45
I run a matlab-script that use batch processing to collect sample from different sensors at same time.
Some sensors are connect using UDP protocol, modbus, and serial port.
As a rule, they work fine. However, sometimes I have an error related to matlabprefs.mat.
As a consequence, one of the sensors can stop to collect data, i.e., I can not read correctly form a specific serial port, and in the next time I run the same matlab script, it will fail producing some complaining about "matlabprefs.mat" (see example below).
I have this problem frequently.
I am affraid becasue If I can not deal properlly with this problem,I can not trust on matlab to control my data sample system.
Please, could you help me to figure out a deffinitive solution for this issue?
Warning: Initializing MATLAB Graphics failed.
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was:
MATLAB:load:unableToReadMatFile
Unable to read MAT-file C:\Users\user\AppData\Roaming\MathWorks\MATLAB\R2023a\matlabprefs.mat. File might be corrupt.
> In hgrc (line 151)
In matlab.graphics.internal.initialize (line 15)
  9 comentarios
Walter Roberson
Walter Roberson el 23 de Ag. de 2024 a las 1:56
What you are asking about happens to be beyond the experience of @Steven Lord . Steven Lord happens to work for Mathworks, but when he posts here, he posts as a volunteer. He is recommending that you contact Mathworks Technical Support.
LucasBar
LucasBar el 23 de Ag. de 2024 a las 16:45
Ok, I just have to say thanks to @Steven Lord.
I already posted the issue on Mathworks Techinical Support.
My best regards

Iniciar sesión para comentar.

Respuestas (1)

Animesh
Animesh el 19 de Ag. de 2024 a las 17:00
  2 comentarios
LucasBar
LucasBar el 19 de Ag. de 2024 a las 18:52
"removing the file helps for some time"
I know this might be a shortcut, but is not a solution. Once the error occurs, it will end the data processing and will not allow matlab starts correctly again. It is not desired that the program starts again, because there is a production chain linked to the script. Imagine this script running an airplane. Matlab should be able to fix this error, without having to restart matlab.
LucasBar
LucasBar el 19 de Ag. de 2024 a las 18:53
We can not just remove the result of an error without solve the error because this error will came back.

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by