Calculate percentile when logical is true

조회 수: 3 (최근 30일)
goyanks1989
goyanks1989 2016년 4월 4일
댓글: Star Strider 2016년 4월 4일
I am looking at a large data set from NASA flight. I am only interested in points when the airplane is higher than 8 km so I set up a logical:
alt8= alt > 8
which gives me back points with 0 (false) or 1 (true) corresponding with points below or above 8 km
Using only these true points when the height is >8, I would like to find the 99th percentile of another data point, vertical velocity.
vv99=prctile(vv,99)
In other words, I need to find the 99th percentile of vertical velocity when alt>8 rather than the 99th percentile for the entire flight.
What kind of loop or statement should I use to extract just the points when alt>8?
Thank you!

채택된 답변

Star Strider
Star Strider 2016년 4월 4일
Try this:
vv99=prctile(vv(alt8),99)
  댓글 수: 2
goyanks1989
goyanks1989 2016년 4월 4일
knew i was overthinking it.... Thank you
Star Strider
Star Strider 2016년 4월 4일
My pleasure.
We all do from time to time.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics and Visualization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by