string extraction from a table
4 views (last 30 days)
Show older comments
How can I extract data for the Brown?
I would appreciate some help, i have been stuck with this.
Age = [38;43;38;40;49;45;42;24;50;99];
Smoker = logical([1;0;1;0;1;1;1;0;0;1]);
LastName = {'Brown_Howard';'Johnson';'Lee';'Diaz';'Sanchez';'Brown_loewo';'Grace';'Brown_justin';'Peter';'Brown_002'};
Height = [71;69;64;67;64;67;66;55;45;88];
Weight = [176;163;131;133;100;136;153;131;133;149];
BloodPressure = [124 93; 19 77; 125 83; 117 75; 122 8;14 75; 135 23; 137 25; 142 30;42 30];
T = table(Age,Smoker,LastName, Weight,Height,BloodPressure)
0 Comments
Accepted Answer
Paul
on 23 Oct 2022
Age = [38;43;38;40;49;45;42;24;50;99];
Smoker = logical([1;0;1;0;1;1;1;0;0;1]);
LastName = {'Brown_Howard';'Johnson';'Lee';'Diaz';'Sanchez';'Brown_loewo';'Grace';'Brown_justin';'Peter';'Brown_002'};
Height = [71;69;64;67;64;67;66;55;45;88];
Weight = [176;163;131;133;100;136;153;131;133;149];
BloodPressure = [124 93; 19 77; 125 83; 117 75; 122 8;14 75; 135 23; 137 25; 142 30;42 30];
T = table(Age,Smoker,LastName, Weight,Height,BloodPressure)
T(startsWith(T.LastName,'Brown'),:)
More Answers (0)
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!