Filter löschen
Filter löschen

Remove outliers in matlab 2018a

2 Ansichten (letzte 30 Tage)
LISSA DUVVU
LISSA DUVVU am 4 Jun. 2022
Kommentiert: LISSA DUVVU am 6 Jun. 2022
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 Kommentare
Matt J
Matt J am 4 Jun. 2022
You've presented a solution already. What help is needed?
LISSA DUVVU
LISSA DUVVU am 4 Jun. 2022
dset(dataout)= [];
this is not working.
I mean removing from all other columns is not working.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 4 Jun. 2022
Bearbeitet: Matt J am 4 Jun. 2022
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 Kommentare
Steven Lord
Steven Lord am 4 Jun. 2022
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 am 6 Jun. 2022
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,:)= [];

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by