Exclude more than one outlier in linear function

조회 수: 1 (최근 30일)
Tania
Tania 2014년 7월 11일
댓글: Tania 2014년 7월 13일
Hi,
I would like to remove the values under -4.000.000 and over 2.000.000, but I get the following error message: >> outl = find(mdl.Residuals.Raw<-4000000 & mdl.Residuals.Raw>2000000) outl = Empty matrix: 0-by-1 There are definitely values between these two values.. Thank you for your help!

채택된 답변

Star Strider
Star Strider 2014년 7월 11일
You’re asking it to find residuals that are both <-4E6 and >2E6 simultaneously.
Change the statement to:
outl = find(mdl.Residuals.Raw<-4000000 | mdl.Residuals.Raw>2000000)
and see if that does what you want.

추가 답변 (1개)

Joseph Cheng
Joseph Cheng 2014년 7월 11일
you'll need to use the logical comparison OR '|' not AND '&'. as you are doing mdl.Residuals.Raw<-4000000 AND mdl.Residuals.Raw>2000000 where there are no intersections where both are true (look up the truth table for AND where both conditions have to be true). You're looking for the values that are <-4000000 or are greater than 2000000. what you have is values that are < and also are > than 2000000

카테고리

Help CenterFile Exchange에서 Resampling Techniques에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by