categoricalBarchart​1.zip

groups categorical data in a bar chart
172 Downloads
Updated 24 Jul 2014

View License

Use and application: there many applications that require the quantitative comparison of lists. Good examples are the case control clinical trials where life style, ethnicity and socio-economic data are compared.
Function: comparing list with categorical data
Input: as mentioned above one application is the case and control study design for clinical data and in this case one would chose the case and control status of the participants and compare them against all other parameters in the annotation.
Output: is a cell array with all group x category combinations and a vector with the counts for each group and category combination. This output can be easy graphed using a bar chart. The output is organized in a way the grouping comes first followed by the category which makes difference between the groups easily visible.
This function can easy be used in a loop and analyses and entire MS Excel spreadsheet with vast amounts of categorical data can be analysed in a very short period of time.
Input data: cel arrays – they can be easily extracted from MS Excel files : [raw, txt,cel]=xlsread('demo.xlsx');

Cite As

Dr. Jens Koopmann (2024). categoricalBarchart1.zip (https://www.mathworks.com/matlabcentral/fileexchange/47331-categoricalbarchart1-zip), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Bar Plots in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0