Filter löschen
Filter löschen

Decimals

2 Ansichten (letzte 30 Tage)
Salvatore Turino
Salvatore Turino am 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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 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 Kommentar
Salvatore Turino
Salvatore Turino am 26 Jan. 2012
thank you :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by