lundi 22 juin 2015

How do i show value that meets specific criteria in wolfram mathematica ?

i will try to explain my problem Lets say i have data like this x={1,2,3,4,5,6} and my condition is 4<=x<=6 and i want to show that the value that meets criteria is 5. my program looks like this

k = 0;

Do[If[4 <= x[[i]] <= 6, k = k + 1], {i, 1, Length[data]}];

Print["amount of numbers that meets criteria ", k]

and my problem is i don't know how to continue to show the Value of number that meets criteria.

Thanks for help

Aucun commentaire:

Enregistrer un commentaire