필터 지우기
필터 지우기

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.

답변 (2개)

Subin Kuttappan Stellal Mary
Subin Kuttappan Stellal Mary 2016년 4월 15일
Refer this link posted by MathWorks Technical Support team which addresses the 'memory allocation error'
  댓글 수: 2
Dusan
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
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
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.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by