Why does Simulink delete code from matlab functions body?

12 vues (au cours des 30 derniers jours)
Alessandro Minerba
Alessandro Minerba le 15 Déc 2021
As described, Simulink sometimes randomly deletes the body code from matlab function blocks. Any attempt to bring back the deleted code is useless. Does anyone have the same issue?
(Matlab 2021 B release running)
  9 commentaires
Ben MacCallum
Ben MacCallum le 17 Jan 2022
Modifié(e) : Ben MacCallum le 17 Jan 2022
I have experienced this problem time and time again since upgrading to 2021b. I have lost the code within several different MATLAB Function blocks after saving and reopening the model. This is not specific to one model and it only happens occasionally, but after the code is lost, it never reappears, no matter how many times the model is closed and reopened. I would like to know if there is a way to recover the lost code.
Alessandro Minerba
Alessandro Minerba le 11 Fév 2022
No way to recover the lost code. Just rewrite it or try to close the model without saving any update.

Connectez-vous pour commenter.

Réponses (2)

Andrea Mazzeo
Andrea Mazzeo le 28 Déc 2021
Same issue here. Seems to be common since my colleagues have encountered it too on multiple occasions.

Sivani Pentapati
Sivani Pentapati le 18 Jan 2022
Modifié(e) : Sivani Pentapati le 26 Juin 2022
Hi Alessandro,
The Development team is aware of this issue and has published a Bug Report Bug Reports (mathworks.com). Please visit the Bug Report to get the latest information on fixes and possible workarounds.
  8 commentaires
Sivani Pentapati
Sivani Pentapati le 31 Mai 2022
Thank you for providing the information, I have brought this issue to the notice of the concerned people and I will get back to you.
Dr. Fernando Viadero-Monasterio
Thank you for your help, I will update Matlab and see if it happens again. In my case, this problem only shows up when I am calling Simuling externally from the vehicle simulation software CarSim

Connectez-vous pour commenter.

Catégories

En savoir plus sur Event Functions dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by