Set a bin to count the data points for certain conditions
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi there,
I want to count the number of data values that are in this conditions
if it satisfies both conditions then count it
if dist>= R & dist<=(R+dr)
and
if dist1>= R1 & dist1<=(R1+dr1)
Please help.
댓글 수: 2
Jos (10584)
2013년 7월 17일
I suggest you give a (very) small example!
dist = [...]
dist1 = [...]
R = ...
etc.
ExpectedOutcome is: ...
채택된 답변
Sean de Wolski
2013년 7월 17일
idx = (dist >= R) & (dist<=(R+dr)) & (dist1>=R1) & (dist1<=(R1+dr1)); %all that meet criteria
count == nnz(idx); %how many of these were true?
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!