Count Numbers between two values in random vectors
Mostra commenti meno recenti
I am trying to find the how many numbers are between two specific values in a random vector. For example, How many are betweens 1 and 5
A=[1,2,3,4,5]
is should return 3 in this case. So what is the function that allow me to identify this?
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 6 Gen 2015
find(A==5)-find(A==1)-1
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!