How to determine number of patients in the category
3 ビュー (過去 30 日間)
古いコメントを表示
I am trying to determine how many patients fall into each BMI class and each blood pressure class. Like how many patients are "Normal", how many are "Overweight", etc. and how many have normal bp or high bp, etc. Here is the table I have formulated. It is named data_table. I am stuck on how to count the patients.
0 件のコメント
回答 (2 件)
Voss
2025 年 3 月 17 日
data_table = table([1;2;3;4;5;6],[24;26;25;28;27;26],["Underweight";"Optimal";"Obese";"Obese";"Obese";"Optimal"],["Low";"Normal";"Normal";"Pre Hypertension";"Stage 1 Hypertension";"Normal"],'VariableNames',{'ID','Age','BMI Class','Blood Pressure Class'})
result = groupcounts(data_table,{'BMI Class','Blood Pressure Class'})
Reference:
These may also be useful:
0 件のコメント
Star Strider
2025 年 3 月 17 日
Try something like this —
imshow(imread('Screenshot 202....55.14 PM.png'))
BMIC = ["Underweight","Optimal","Obese"];
T = table(Size =[10,1], VariableTypes={'string'}, VariableNames={'BMI Class'});
T.('BMI Class') = BMIC(randi(3,10,1)).'
[Cu,~,idx] = unique(T.('BMI Class'))
Tally = accumarray(idx, ones(size(idx)))
Result = table(Cu,Tally)
.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
