loading a file .mat problem

when i load a file.mat and i tried to open it , matlab hang out and gives this message
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
at javax.swing.table.DefaultTableColumnModel.getSelectedColumns(Unknown Source)
at javax.swing.JTable.getSelectedColumns(Unknown Source)
at com.mathworks.widgets.spreadsheet.SpreadsheetTable.areOnlyEntireRowsSelected(SpreadsheetTable.java:1115)
atcom.mathworks.widgets.spreadsheet.SpreadsheetTable.access$2200(SpreadsheetTable.java:65)
atcom.mathworks.widgets.spreadsheet.SpreadsheetTable$UnamInsertDeleteAction.reexamineActionEnabled(SpreadsheetTable.java:1724)
atcom.mathworks.widgets.spreadsheet.SpreadsheetTable.reexamineRegionAmbiguities(SpreadsheetTable.java:651)
atcom.mathworks.widgets.spreadsheet.SpreadsheetTable.access$900(SpreadsheetTable.java:65)
atcom.mathworks.widgets.spreadsheet.SpreadsheetTable$RowSelectionListener.valueChanged(SpreadsheetTable.java:640)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.removeSelectionIntervalImpl(Unknown Source)
at javax.swing.DefaultListSelectionModel.clearSelection(Unknown Source)
>>

Réponses (3)

mausam
mausam le 21 Avr 2014

0 votes

your data may be too large. try 'whos' to get variables inside it and then try loading it separately.

3 commentaires

mado
mado le 21 Avr 2014
Modifié(e) : mado le 21 Avr 2014
it is a single variable of 2x425041 ? i want one row how to do that
mausam
mausam le 22 Avr 2014
lets say you have 'data1' as your variable.
try
%%========
p=matfile('D:\foldername\yourtobeloadeddata.mat');
desiredvar = p.data1(1,:);
%%================
it should work
mausam
mausam le 22 Avr 2014
i was assuming your data is in "D:\foldername"

Connectez-vous pour commenter.

Image Analyst
Image Analyst le 21 Avr 2014

0 votes

2 by 425,041 is not that large. 6.8 megabytes for a double - pretty small actually. Were you running a remote session with someone at a different computer at all (running VNC, Webex, Lync, TeamCenter, etc.)? I've seen weird java errors sometimes when sharing my screen with others.
Star Strider
Star Strider le 21 Avr 2014

0 votes

Please post your relevant code that causes the error.
When you use the load function for a ‘.mat’ file, load adds the variables in the file to your workspace. You do not need to ‘open’ anything after you load it. The variables in it are there in your workspace for you to work with.

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Tags

Question posée :

le 21 Avr 2014

Commenté :

le 22 Avr 2014

Community Treasure Hunt

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

Start Hunting!

Translated by