I get a memory allocation error when try to save my simulink model. How can i fix it?

11 Ansichten (letzte 30 Tage)
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.

Antworten (2)

Subin Kuttappan Stellal Mary
Refer this link posted by MathWorks Technical Support team which addresses the 'memory allocation error'
  2 Kommentare
Dusan
Dusan am 4 Dez. 2017
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 am 4 Dez. 2017
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.

Melden Sie sich an, um zu kommentieren.


Mukhtiar Ahmad
Mukhtiar Ahmad am 8 Dez. 2018
my simulation stop after passing of 0.442 second without sowing any error, what i do?i need help in this regard.

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by