Boxplot for large matrix crashes computer

4 views (last 30 days)
Max Gawryla
Max Gawryla on 14 Jul 2015
Commented: the cyclist on 14 Jul 2015
I have a very large matrix A of size 3831360x28. I would like to make a boxplot for all 28 columns side by side to compare, but whenever I run the command
boxplot(A)
it uses all of my computer's memory and I need to kill the power to regain control. Is there a way around this? By doing some experimenting, my computer crashes somewhere between 1 and 10 million data points being put into this command.

Answers (1)

the cyclist
the cyclist on 14 Jul 2015
I'm able to run that command without a crash. (R2015a, on a fairly new Macbook Pro.)
One possible solution would be for you to sample your data (say, 1 out of every 10 points) before plotting.
  2 Comments
Max Gawryla
Max Gawryla on 14 Jul 2015
Edited: Max Gawryla on 14 Jul 2015
I'm also running R2015a, but I'm on a fairly old Dell laptop. What exactly do you mean by "sample my data"?
EDIT: I understand how to sample data, in this particular situation, the devil in the details and sampling will really blur those fringe events.
the cyclist
the cyclist on 14 Jul 2015
I guess it depends on exactly what you are trying to accomplish with the box plot. I assumed you were just getting a general feel for the different distributions, or convey those to some audience. If you choose 1 out of 10 points at random to plot, I would expect the "look and feel" of the plots will be nearly identical, good enough for preliminary exploratory work.
What are you trying to actually do, if "blurring fringe events" matters? I would think some analytical technique would be needed, not just a plot.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!