Why does MATLAB crash when plotting?
Afficher commentaires plus anciens
Hi, I am learning Matlab and am running a simple script. In particular, I don't why but for a few days when plotting, Matlab 2021a is unreasonably slow and crash on my PC (Itel core i7 CPU 2.50 Ghz RAM 8 GB).
I am trying a simple plot:
plotData(X, y);
>> sz = size(X)
sz =
118 2
>> sz = size (y)
sz =
118 1
Any ideas?
Thanks
7 commentaires
Walter Roberson
le 21 Mar 2021
What message do you see when it crashes?
What is plotData() ? Is it from https://www.mathworks.com/matlabcentral/fileexchange/58273-one-vs-all-classification-using-logistic-regression-for-iris-dataset ?
Michele Mingione
le 21 Mar 2021
Modifié(e) : Michele Mingione
le 21 Mar 2021
Christopher McCausland
le 21 Mar 2021
Hi Michele,
Which example in the example folder is it?
From the sounds of it the plot function has been included in a very large for loop. MATLAB states that it is "busy" because it is still trying to draw many, many graphs, after a period of time it runs out of RAM and crashes the PC.
Drawing graphs in any program is computationally intensive. Try to stop the plotting and instead collate the data into one final (singular) plot. This should be less intensive to plot.
Hope this helps,
Christopher
Walter Roberson
le 21 Mar 2021
"To help you get more familiar with plotting, we have left plotData.m empty so you can try to implement it yourself. "
Please show how you implemented plotData.m
Image Analyst
le 21 Mar 2021
Please attach all the m-files and data files we need to run your code and reproduce the problem.
Rafael Hernandez-Walls
le 21 Mar 2021
The variable X has two columns, which column do you want to plot against Y?
Rafael Hernandez-Walls
le 21 Mar 2021
vs Y?
Réponses (2)
Arthi Sathyamurthi
le 24 Mar 2021
0 votes
My initial analysis indicates this crash was the result of a known issue. You can refer to the following question for resolution steps.
Michele Mingione
le 3 Avr 2021
0 votes
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

