T1=19×3 table
Age
Height
Weight
___
______
______
Brown
49
64
119
Taylor
31
66
132
Anderson
45
68
128
Lee
44
66
146
Walker
28
65
123
Young
25
63
114
Campbell
37
65
135
Evans
39
62
121
Morris
43
64
135
Rivera
29
63
130
Richardson
30
67
141
Cox
28
66
111
Torres
45
70
137
Peterson
32
60
136
Ramirez
48
64
137
Bennett
35
64
131
⋮
A is a 19-by-3 table.
Since ordinal categorical arrays have a mathematical ordering for their categories, you can perform
element-wise comparisons of them with relational operations, such as greater than and less than.
Create a subtable, T2, of the gender, age, height, and weight of all patients who assessed their health
status as poor or fair.
First, define the subset of rows to include in table T2.
rows = T.SelfAssessedHealthStatus<='Fair';
Then, define the subset of variables to include in table T2.
vars = {'Gender','Age','Height','Weight'};
Use parentheses to create the subtable T2.
T2 = T(rows,vars)
T2=26×4 table
Gender
Age
Height
Weight
______
___
______
______
Johnson
Male
43
69
163
Jones
Female
40
67
133
Thomas
Female
42
66
137
Jackson
Male
25
71
174
Garcia
Female
27
69
131
Rodriguez
Female
39
64
117
Lewis
Female
41
62
137
Lee
Female
44
66
146
Hall
Male
25
70
189
Hernandez
Male
36
68
166
Lopez
Female
40
66
137
Gonzalez
Female
35
66
118
Mitchell
Male
39
71
164
8 Categorical Arrays
8-8
Précédent

- 312/1450

Suivant