MATLAB Answers

Ranjani

How to drop decimal values without rounding off?

Asked by Ranjani
on 14 Mar 2013

I do not want to apply Ceil/round/floor commands. I just want the digits before the decimal points. Example: 959.589 as 959 and also 959.324 as 959. Is it possible to do ?

  1 Comment

Andrei Bobrov
on 14 Mar 2013

use fix

Products

No products are associated with this question.

1 Answer

Answer by Malcolm Lidierth
on 14 Mar 2013
Edited by Malcolm Lidierth
on 14 Mar 2013
 Accepted answer

959.589-rem(959.589,1)

  1 Comment

Ranjani
on 14 Mar 2013

Hey Malcolm, It worked! thank you so much.


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today