MatLab crashes when I insert a large dataset that I am assigning to a matrix

22 visualizaciones (últimos 30 días)
I have a dataset that has more than 4000 rows. When I go to insert it from excel, MatLab crashes and closes completely. There is no error message before it crashes. Is there a setting I can change, so it will accept more data at one time?
  4 comentarios
dpb
dpb el 16 de Jun. de 2021
Say what!!!???
What's the definition of data?
Use readtable or one of his friends to read in the file...you don't mean you're trying to paste in the content of the clipboard or somesuch, surely!!!???
>> which -all name
name is a Java method % com.mathworks.helpsearch.reference.RefEntityType method
name is a Java method % java.lang.Enum method
name is a Java method % com.mathworks.helpsearch.reference.InputArgument$InputArgumentType method
name is a Java method % com.mathworks.mde.editor.breakpoints.DbStopStatus method
name is a Java method % com.mathworks.helpsearch.reference.ReferenceEntityRequest$Precision method
name is a Java method % com.mathworks.help.helpui.DocLocation method
name is a Java method % com.mathworks.mde.editor.breakpoints.DbStopStatus$1 method
name is a Java method % com.mathworks.mde.editor.breakpoints.DbStopStatus$5 method
>> data=readmatrix('trial data.xlsx');
>> whos data
Name Size Bytes Class Attributes
data 7260x6 348480 double
>> data(1:8,:)
ans =
0.4875 0.6722 0.9738 0.5305 0.2955 0.0004
0.4716 0.6830 0.9807 0.5328 0.2972 0.0103
0.4631 0.7071 0.9726 0.5304 0.3118 0.0141
0.4876 0.7473 1.0000 0.5330 0.3103 0.0180
0.4984 0.7383 1.0145 0.5605 0.3198 0.0239
0.4670 0.6897 0.9820 0.5420 0.3138 -0.0105
0.4589 0.6740 0.9638 0.5368 0.3108 -0.0176
0.4505 0.6752 0.9517 0.5382 0.3072 -0.0043
>>
works just fine...
Madison Lester
Madison Lester el 16 de Jun. de 2021
I was trying to paste it from my clipboard. That is what I was told to do, and it works for smaller matrices. I do not use MatLab often enough to have tried any other ways. Thank you for your help.

Iniciar sesión para comentar.

Respuestas (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 16 de Jun. de 2021
Editada: Walter Roberson el 13 de Jul. de 2022
Probably it is related to allocated swap memory for matlab. You can play with tall() to fix this issue.
Here is a nice help doc of MATLAB on this:

Walter Roberson
Walter Roberson el 16 de Jun. de 2021
In the main MATLAB command window, Preferences -> MATLAB -> General -> Java Heap Memory
and increase the memory allocation. You will need to restart MATLAB for the change to have effect.
Java memory is used in processing the clipboard.
... but using readmatrix() is a much better approach.
  2 comentarios
MP
MP el 13 de Jul. de 2022
Even I see this error: Could you please tell what does it mean?
Exception in thread "AWT-EventQueue-0": java.lang.IllegalArgumentException: com.mathworks.toolbox.vision.VipblksPrefsPanel no class matches the supplied argument
at com.mathworks.mlwidgets.prefs.PrefsDialog.getPrefsEditorPanelFactory(PrefsDialog.java:398)
at com.mathworks.mlwidgets.prefs.PrefsDialog.registerPanel(PrefsDialog.java:359)
at com.mathworks.mlwidgets.prefs.PrefsDialogRegistrar.preRegisterPanels(PrefsDialogRegistrar.java:210)
at com.mathworks.mlwidgets.prefs.PrefsDialog.initialize(PrefsDialog.java:102)
at com.mathworks.mlwidgets.prefs.PrefsDialog.access$500(PrefsDialog.java:32)
at com.mathworks.mlwidgets.prefs.PrefsDialog$4.run(PrefsDialog.java:278)
at com.mathworks.mlwidgets.prefs.PrefsDialog.showPrefsDialog(PrefsDialog.java:292)
at com.mathworks.mlwidgets.prefs.PrefsDialog.doShowPrefsDialog(PrefsDialog.java:252)
at com.mathworks.mlwidgets.prefs.PrefsDialog.showPrefsDialog(PrefsDialog.java:128)
at com.mathworks.mlwidgets.prefs.PrefsDialog.showLastPrefsDialog(PrefsDialog.java:165)
at com.mathworks.mlservices.MLPrefsDialogServices.showLastPrefsDialog(MLPrefsDialogServices.java:44)
at com.mathworks.mde.desk.MLDesktop$PreferencesAction.actionPerformed(MLDesktop.java:3073)
at com.mathworks.mwswing.ChildAction.actionPerformed(ChildAction.java:214)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at com.mathworks.toolstrip.plaf.RegularButtonUI$RegularToolstripButtonListener.mouseReleasedImpl(RegularButtonUI.java:364)
at com.mathworks.toolstrip.plaf.RegularButtonUI$RegularToolstripButtonListener.mouseReleased(RegularButtonUI.java:354)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at com.mathworks.mwswing.MJButton.processMouseEvent(MJButton.java:350)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:8
Walter Roberson
Walter Roberson el 13 de Jul. de 2022
I am not certain, but I would suggest starting by reinstalling Computer Vision Toolbox

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by