Effacer les filtres
Effacer les filtres

How can I count the number of times x matches any of the values in a separate column and y is less than a specific value?

2 vues (au cours des 30 derniers jours)
I have a column of x values that correspond to a column of y values (same dimensions). I also have a second column of x values with different dimensions. I want to count the number of times when the x values from the first column match any of the x values from the second column AND y is less than a threshold value.
This is what I tried, but it isn't working because the matrix dimensions for the x columns don't agree.
sum(y1 > 1.4 & x1 == x2)

Réponses (1)

madhan ravi
madhan ravi le 8 Jan 2019

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by