필터 지우기
필터 지우기

Remove outliers in matlab 2018a

조회 수: 2 (최근 30일)
LISSA DUVVU
LISSA DUVVU 2022년 6월 4일
댓글: LISSA DUVVU 2022년 6월 6일
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