MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
The function histogram accepts the categorical array, SelfAssessedHealthStatus,
and plots the category counts for each of the four categories.

Create a histogram of the hospital location for only the patients who assessed their health
as Fair or Poor.

figure
histogram(Location(SelfAssessedHealthStatus<='Fair'))
title('Location of Patients in Fair or Poor Health')

8 Categorical Arrays

Free download pdf