I have the problem of Error Dialog.

6 vues (au cours des 30 derniers jours)
NOTHILE LUNGELENI
NOTHILE LUNGELENI le 12 Sep 2024
I'm trying to open my MATLAB file but it's doesn't open. keep on writting this error which I don't understand because I lasp open my file on the 23/08/24.
  1 commentaire
dpb
dpb le 12 Sep 2024
Hopefully you have a backup because it appears somehow that one has become corrupted.
Unfortunately, while I don't have Simulink to compare, it does seem that occasionally .mat files also become unreadable for no known or discernible reason; it would appear from the error message something similar has happened there.

Connectez-vous pour commenter.

Réponses (1)

nick
nick le 13 Sep 2024
Hi Nothile,
It looks like you're experiencing issues with a corrupted SLX file in Simulink. By attempting to load the Simulink model into memory and then saving it with a new file name, you may be able to recover the model. Here's a MATLAB script that demonstrates the same:
load_system('Model_Name');
bdroot % Returns the top-level model of the system and checks if the model is loaded
save_system('Model_Name','New_File_Name')
Replace 'Model_Name' with the name of your corrupted SLX file, and 'New_File_Name' with the desired name for the new file.
You can refer to the MATLAB documentation to learn more about the functions 'load_system' and 'save_system':
If this workaround doesn't resolve the issue, I recommend reaching out to MathWorks Technical Support for further assistance:
  3 commentaires
dpb
dpb le 13 Sep 2024
@NOTHILE LUNGELENI, @nick specifically said "Replace 'Model_Name' with the name of your corrupted SLX file," not to blindly just copy and paste.
However, it's highly unlikely that load_system will open the model file if it fails to open normally.
Whether Tech Support can help is also problematic, but all they can do is say, "Sorry!" if not, so nothing would be lost by trying.
If you do not have a backup or earlier copy of the model, unfortunately, I expect the bad news is you'll be rebuilding it from scratch.
NOTHILE LUNGELENI
NOTHILE LUNGELENI le 14 Sep 2024
I manage bu find the circuit picture, so is there an something I can do to read the picture because it is blur.
Thank you, I'm in the process of building from the scratch.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by