Why does Simulink delete code from matlab functions body?
19 views (last 30 days)
Show older comments
Alessandro Minerba on 15 Dec 2021
Commented: Fernando Viadero Monasterio on 19 Oct 2022
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)
Andrea Mazzeo on 28 Dec 2021
Same issue here. Seems to be common since my colleagues have encountered it too on multiple occasions.
Sivani Pentapati on 18 Jan 2022
Edited: Sivani Pentapati on 26 Jun 2022
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.
Fernando Viadero Monasterio on 19 Oct 2022
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
Find more on Manual Performance Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!