How to find values from data
조회 수: 8 (최근 30일)
이전 댓글 표시
When using if statements, I am trying to find a set of data that fits the condition I have given. How can I find where the data with the right conditions is located?
댓글 수: 0
답변 (1개)
KSSV
2021년 12월 12일
You can use logical indexing.
Example:
A = rand(10,1) ; % data for demo
idx = A > 0.3 & A < 0.8 ;
idx
find(idx)
A(idx)
댓글 수: 5
Star Strider
2021년 12월 12일
What are the row and column sizes are the two data sets? Do they have common times (or any other specific identifying row information)?
참고 항목
카테고리
Help Center 및 File Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!