MATLAB Answers

how to turn decimal numbers to integers

7 views (last 30 days)
xueqi
xueqi on 15 Aug 2012
Dear fellows,
Do you have any idea how to turn a set of results which are decimal numbers to integers?

  0 Comments

Sign in to comment.

Accepted Answer

Ilham Hardy
Ilham Hardy on 15 Aug 2012
Use
round()
or
fix()
HTH,IH

  0 Comments

Sign in to comment.

More Answers (1)

Isktaine
Isktaine on 15 Aug 2012
Assuming your results are stored in A then:
fix(A)

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by