Boxplot with vectors of different lengths

3 vues (au cours des 30 derniers jours)
Jacob
Jacob le 18 Fév 2016
Commenté : Randy Diaz le 20 Oct 2018
Hi, I have 3 vectors of different lengths and want to plot them on the same boxplot.
My variables are:
PR = 24 datapoints PU = 18 data points PS = 6 data points
How do I do this?
Thanks!

Réponses (1)

Marc
Marc le 18 Fév 2016
You can take a look at boxplot2 from GitHub which I think handles this.
Otherwise, a simple work around is to pad your vectors with NaNs to equal length. Boxplot in the stats toolbox ignores NaNs....
  1 commentaire
Randy Diaz
Randy Diaz le 20 Oct 2018
Hey Marc, could you please elaborate

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by