テーブル配列の任意の値が含まれる行のみ取り出すにはどうすればよいですか?
Show older comments
テーブル配列において、特定の列の、任意の値が含まれる行のみを取り出す方法を教えてください。
例えば、以下のようなテーブルにおいて、Smoker が true の行のみを抽出する方法があれば教えてください。
LastName = ["Sanchez";"Johnson";"Zhang";"Diaz";"Brown"];
Age = [38;43;38;40;49];
Smoker = [true;false;true;false;true];
Height = [71;69;64;67;64];
Weight = [176;163;131;133;119];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];
Gender = {'f';'f';'m';'m';'f'};
patients = table(LastName,Age,Smoker,Height,Weight,BloodPressure,Gender)
Accepted Answer
More Answers (0)
Categories
Find more on table 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!