Remove outliers in matlab 2018a

2 次查看(过去 30 天)
Hello,
I have a matrix contains 5 columns,
I want to remove the outliers from the 5th column using matlab 2018a and then same should be removed from the other four columns also
Now i am using
dset = Final_roti ; %data with 5 columns
dataout = removeoutliers(dset(:,5));
dset(dataout)= []; % this is not working
please help me out from this problem
  2 个评论
Matt J
Matt J 2022-6-4
You've presented a solution already. What help is needed?
LISSA DUVVU
LISSA DUVVU 2022-6-4
dset(dataout)= [];
this is not working.
I mean removing from all other columns is not working.

请先登录,再进行评论。

采纳的回答

Matt J
Matt J 2022-6-4
编辑:Matt J 2022-6-4
Perhaps as follows:
A=repmat((1:5)',1,5); A(end-1)=100,
A = 5×5
1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 100 5 5 5 5 5
tf=isoutlier(A(:,5));
A(tf,:)=[]
A = 4×5
1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 5 5 5 5 5
  4 个评论
Steven Lord
Steven Lord 2022-6-4
What does "does not work" mean in this context?
  • Do you receive warning and/or error messages? If so the full and exact text of those messages (all the text displayed in orange and/or red in the Command Window) may be useful in determining what's going on and how to avoid the warning and/or error.
  • Does it do something different than what you expected? If so, what did it do and what did you expect it to do?
  • Did MATLAB crash? If so please send the crash log file (with a description of what you were running or doing in MATLAB when the crash occured) to Technical Support so we can investigate.
Please show us a small sample of data, show us what steps you perform to try to remove outliers from that data set, show us the results you received, and tell us what results you expected to receive and why. And no, your original message is not sufficient for this purpose; we have no idea what data your Final_roti variable contains.
LISSA DUVVU
LISSA DUVVU 2022-6-6
After trying the above code, the error is
Index in position 1 is invalid. Array indices must be positive integers or logical values.
Error in S4_index (line 64)
dset(dataout,:)= [];

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by