Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How to drop decimal values without rounding off?

Asked by Ranjani

Ranjani (view profile)

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

Andrei Bobrov (view profile)

on 14 Mar 2013

use fix

Ranjani

Ranjani (view profile)

Products

No products are associated with this question.

1 Answer

Answer by Malcolm Lidierth

Malcolm Lidierth (view profile)

on 14 Mar 2013
Edited by Malcolm Lidierth

Malcolm Lidierth (view profile)

on 14 Mar 2013
Accepted answer

959.589-rem(959.589,1)

1 Comment

Ranjani

Ranjani (view profile)

on 14 Mar 2013

Hey Malcolm, It worked! thank you so much.

Malcolm Lidierth

Malcolm Lidierth (view profile)

Contact us