how to delete outliers data for 15 person Separately?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello ,Have a good time.
I have 15 patients with 13 characteristic columns. After using the rmoutliers command(for delete outliers data), it overlaps all the rows of different people and shows it as 36221 * 13. And I want to know, for example, how many rows belong to the first patient and how many rows belong to the second patient is and... . (Must be in the form of 15 separate people * 13 columns to match it with the labels of these people.)
I put the MATLAB code related to my work here. I do not know what changes I should make to the codeand How can I determine which sections of data of sick people it corrects?.If anyone could help me, thank you.
DATA1=[];B1=[];
for i = 1:15
data1 = load(strcat(strcat('park',num2str(i)),'.ts'));
DATA1 = [DATA1;data1];
[B,TF]=rmoutliers(DATA1);B1=[B1:B];
end
Or, for example, if I use the find command, if I put DATA, it will override all the rows of different people, and if I use data, it will only display information about the 15th person.I put the MATLAB code related to my work here
temp1 = DATA1(:,2);temp1(find(temp1>1.6)) = [];
Thanks a lot.
1 件のコメント
Jeff Miller
2022 年 6 月 24 日
I can't see what you are trying to do. In particular, it makes no sense to me to call rmoutliers once with the data of patient 1, then again with the data of patients 1 & 2, then again with 1,2, and 3, ... It would make more sense to use either this (if you want rmoutliers to look at the data from all patients together)
DATA1=[];B1=[];
for i = 1:15
data1 = load(strcat(strcat('park',num2str(i)),'.ts'));
DATA1 = [DATA1;data1];
end
[B,TF]=rmoutliers(DATA1);
or else this (if you want rmoutliers to look at the data from each patient separately)
DATA1=[];B1=[];
for i = 1:15
data1 = load(strcat(strcat('park',num2str(i)),'.ts'));
[B,TF]=rmoutliers(data1);
DATA1 = [DATA1;B];
end
採用された回答
Jeff Miller
2022 年 6 月 24 日
I think I see the issue now. Maybe this is better:
DATA1=[];
SUBJECT = [];
for i = 1:15
data1 = load(strcat(strcat('park',num2str(i)),'.ts'));
[B,TF]=rmoutliers(data1);
subject = i*ones(size(B,1),1);
DATA1 = [DATA1;B];
SUBJECT = [SUBJECT; subject];
end
At the end of this loop, SUBJECT(i) will have the subject number for row i.
0 件のコメント
その他の回答 (2 件)
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!