Natural number determination
Afficher commentaires plus anciens
In a vector how a determinate if the values is a natural number or not A=[ 1 2.2 3 5 6 8.8 9.6 ]
Réponse acceptée
Plus de réponses (2)
Sang Eun Lee
le 16 Mai 2016
1 vote
Hello I'm stuendt of Chung Nam National University in Korea. I'm very impressed of your command and I use it very usefully. Thanks A lot
Walter Roberson
le 28 Juil 2011
0 votes
You can also check whether A>0 and mod(A,1) is non-zero .
The methods so far all suffer from loss of precision as the numbers increase, being only able to work with the nearest IEEE 754 double-precision representation to the number instead of the number itself.
Catégories
En savoir plus sur Discrete Data Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!