how to save work space?

조회 수: 2 (최근 30일)
MURTADHA ALDEER
MURTADHA ALDEER 2012년 7월 26일
Dears
I am trying to save the workspace of my simulation program, however I get this message
Not enough memory to read file contents: Java heap space
Could you please help me with this!
regards

답변 (3개)

Thomas
Thomas 2012년 7월 26일
편집: Thomas 2012년 7월 26일
You could increase the Java Heap size as follows:
Windows:File->Preferences->General->Java heap space
Mac: MATLAB->Prefernces->General-> Java Heap Memory
Move the slider to maximum available Java Heap size and see if you still get the error
USe save or matfile to save your workspace
doc save
doc matfile
  댓글 수: 3
Srinivas
Srinivas 2012년 7월 26일
MURTADHA ALDEER
MURTADHA ALDEER 2012년 7월 28일
I am using Matlab R 2008a, when I used the commands in the blog I got this message when running my program?
Not enough memory to read file contents: Java heap space Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Unknown Source) at java.lang.String.<init>(Unknown Source) at org.netbeans.editor.DocumentContent.getText(DocumentContent.java:152) at org.netbeans.editor.DocumentContent.getString(DocumentContent.java:142) at javax.swing.text.AbstractDocument.getText(Unknown Source) at com.mathworks.widgets.text.mcode.BaseDocumentMTreeProvider.getTextFromDocument(BaseDocumentMTreeProvider.java:56) at com.mathworks.widgets.text.mcode.MTreeDocumentProvider.getText(MTreeDocumentProvider.java:25) at com.mathworks.widgets.text.mcode.MTreeDocumentProvider.getMTree(MTreeDocumentProvider.java:63) at com.mathworks.widgets.text.mcode.MTreeBaseDocumentCache.getMTree(MTreeBaseDocumentCache.java:35) at com.mathworks.widgets.text.mcode.MFoldManager.getInitialFoldsInfo(MFoldManager.java:408) at com.mathworks.widgets.text.mcode.MFoldManager.createFolds(MFoldManager.java:273) at com.mathworks.widgets.text.mcode.MFoldManager.initFolds(MFoldManager.java:87) at org.netbeans.modules.editor.fold.FoldOperationImpl.initFolds(FoldOperationImpl.java:96) at org.netbeans.modules.editor.fold.FoldHierarchyExecution.rebuildManagers(FoldHierarchyExecution.java:643) at org.netbeans.modules.editor.fold.FoldHierarchyExecution.rebuild(FoldHierarchyExecution.java:576) at org.netbeans.modules.editor.fold.FoldHierarchyExecution$2.run(FoldHierarchyExecution.java:749) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Exception in thread "Thread-7" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Unknown Source) at java.lang.String.<init>(Unknown Source) at org.netbeans.editor.DocumentContent.getText(DocumentContent.java:152) at org.netbeans.editor.DocumentContent.getString(DocumentContent.java:142) at javax.swing.text.AbstractDocument.getText(Unknown Source) at com.mathworks.widgets.text.mcode.MLintDecorator.doMLint(MLintDecorator.java:998) at com.mathworks.widgets.text.mcode.MLintDecorator.access$2300(MLintDecorator.java:36) at com.mathworks.widgets.text.mcode.MLintDecorator$MLintRunnable.run(MLintDecorator.java:1143) at java.lang.Thread.run(Unknown Source)

댓글을 달려면 로그인하십시오.


Sumit Tandon
Sumit Tandon 2012년 7월 26일
How are you saving the workspace? If you are saving variables to MAT-files, then consider using MATFILE command. It allows saving variable partially - using less memory in the process.

venkat vasu
venkat vasu 2012년 7월 26일
save('filename','A','-append') use this code
this may be useful for you.

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by