I have the problem of Error Dialog.

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 Comment

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.

Sign in to comment.

Answers (1)

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 Comments

I tried load_system but it says "Error usng load_system: 'model_name' is not a valid name because it is not a valid MATLAB function name.
@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.
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.

Sign in to comment.

Categories

Products

Release

R2024a

Asked:

on 12 Sep 2024

Commented:

on 14 Sep 2024

Community Treasure Hunt

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

Start Hunting!