Boxplot with vectors of different lengths

조회 수: 3 (최근 30일)
Jacob
Jacob 2016년 2월 18일
댓글: Randy Diaz 2018년 10월 20일
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!

답변 (1개)

Marc
Marc 2016년 2월 18일
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
Randy Diaz
Randy Diaz 2018년 10월 20일
Hey Marc, could you please elaborate

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by