how to delete outliers data for 15 person Separately?

1 回表示 (過去 30 日間)
NGR MNFD
NGR MNFD 2022 年 6 月 23 日
編集済み: NGR MNFD 2022 年 6 月 28 日
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
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
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.

その他の回答 (2 件)

NGR MNFD
NGR MNFD 2022 年 6 月 24 日
hello dear , thanks for your answer ,but both of this code matlab that you recommended me is the same. it get me a big vector for example 3251*13 or ...I mean that when I use rmoutliers command ,finally I like to know forexample from column 1 to 126 for the first subject and from column 127 to 320 for the second subject and....but with your matlab code all of my data sit in the one big matrix. and i do not know what number of row decrease from the first subject or the others. thanks alot again.

NGR MNFD
NGR MNFD 2022 年 6 月 28 日
編集済み: NGR MNFD 2022 年 6 月 28 日
thanks so much dear jeff miller

カテゴリ

Help Center および File ExchangeTables についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by