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 Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by