I get a memory allocation error when try to save my simulink model. How can i fix it?
9 次查看(过去 30 天)
显示 更早的评论
My simulink model was working complitly fine. But suddenly i get this memory allocation error when i try to save my model! and also when i try to build the model i get another error "Undefined function 'sflink2chart' for input arguments of type 'double' " would you please help me about these errors.
0 个评论
回答(2 个)
Subin Kuttappan Stellal Mary
2016-4-15
Refer this link posted by MathWorks Technical Support team which addresses the 'memory allocation error'
2 个评论
Dusan
2017-12-4
This is (likely, I don't have access to the code) a return on a memory allocation request error. It may not be a problem of lack of physical memory (Unless you have a very old machine, or a lot of scopes, most will have virtual memory sufficient to allocate more than enough). This shouldn't be a problem on modern systems with well written software. Simulation may not run if you run out of disk space, but saving?
I have seen this error caused by invalid Simulink blocks. For instance, I have just seen this error caused when attempting to save a model previously saved in a newer version of Matlab. In this case, only stateflow blocks were problematic (some 2015b models without stateflow blocks can be saved in 2013b) So, it may be that when attempting to allocate the memory for the chart an error was returned, and dropped into a "memory error" catch or finally bucket. Not a great error message when the real problem is version related.
The difficulty is compounded because once saved without the charts, the model appears normal, but I can't add stateflow to it. Thus the problem may be hidden. I have also run into the problem with from time to time with library blocks.
So, in my cases, this was caused by libraries or models saved in more recent versions. By opening them in a newer version (and if required for compatibility reasons, exporting to the older version) the problem can be resolved.
Dusan
2017-12-4
The message "Undefined function 'sflink2chart' for input arguments of type 'double' is also a clue. This function is not defined perhaps because it is in an S function not on the path or poorly defined matlab function. I suspect if you track down this function you will eliminate both errors.
Mukhtiar Ahmad
2018-12-8
my simulation stop after passing of 0.442 second without sowing any error, what i do?i need help in this regard.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!