Set a bin to count the data points for certain conditions
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Jos (10584)
il 17 Lug 2013
I suggest you give a (very) small example!
dist = [...]
dist1 = [...]
R = ...
etc.
ExpectedOutcome is: ...
Risposta accettata
Sean de Wolski
il 17 Lug 2013
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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Import, Export, and Conversion in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!