Creating a boxplot from 2 tables

조회 수: 5 (최근 30일)
Faris Durakovic
Faris Durakovic 2020년 3월 20일
댓글: Faris Durakovic 2020년 3월 21일
I am working with a dataset that containts 100 sample from red and 100 sample white wine. Basiclly I have 2 tables, one for red and one for white. Each table containts 12 charateristics that are mesearued for both wines. Now I need to make box plot for each of the charatersitic of wine for both red and white. That is 24 box plot. I tried to use function boxplot(Name of the table), but I get 12 boxplot that are not scaled and not usable.
I need a answer which is the easiset way to make one boxplot from table that I need and for characterstic I need.
Thank you in advance

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 3월 20일
If you have two tables t1 and t2, you can combine them in boxplot by combining their matrices
boxplot([t1.Variables t2.Variables])
  댓글 수: 5
Ameer Hamza
Ameer Hamza 2020년 3월 21일
편집: Ameer Hamza 2020년 3월 21일
Which release of MATLAB are you using? What is the type of variables red and white? Are these matrices or tables?
Faris Durakovic
Faris Durakovic 2020년 3월 21일
Matlab version I am using.
This is how the data is imported in matlab
This is how it looks in matlab. I am new to matlab, but these should suppose to be tables if I am not mistaken!?

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by