how to save work space?

2 visualizaciones (últimos 30 días)
MURTADHA ALDEER
MURTADHA ALDEER el 26 de Jul. de 2012
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

Respuestas (3)

Thomas
Thomas el 26 de Jul. de 2012
Editada: Thomas el 26 de Jul. de 2012
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 comentarios
Srinivas
Srinivas el 26 de Jul. de 2012
MURTADHA ALDEER
MURTADHA ALDEER el 28 de Jul. de 2012
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)

Iniciar sesión para comentar.


Sumit Tandon
Sumit Tandon el 26 de Jul. de 2012
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 el 26 de Jul. de 2012
save('filename','A','-append') use this code
this may be useful for you.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by