How to create a histogram to count specific matrix element pairs?
Ältere Kommentare anzeigen
I have a 100x2 matrix that corresponds to a set of demographic data about a sample population. The first column contains either one of two possible values (1 or 2, to represent male/female genders), and the second column contains one of five possible values (to represent five income brackets). Each row represents the demographic characteristics of one person in my 100-person population. I understand how to make two histograms that each represent either the distribution of gender or the distribution of income, but I cannot seem to figure out how to make a histogram that counts the number of females ("2") with a particular income. How do I configure my histogram to consider two elements at once?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Histograms finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!