Decimals

5 vues (au cours des 30 derniers jours)
Salvatore Turino
Salvatore Turino le 26 Jan 2012
Hello.i have a vector that is: C=[1;1.0000;1.0000;1.0000]
how can i see if there is any approssimations?

Réponse acceptée

Walter Roberson
Walter Roberson le 26 Jan 2012
C ~= round(C)
will return 1 for any position that is not an integer.
You may also want to try something like
fprintf('%.99g\n', C)
  1 commentaire
Salvatore Turino
Salvatore Turino le 26 Jan 2012
thank you :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by