How can I remove integers after the decimal points

1 Ansicht (letzte 30 Tage)
Anup Badve
Anup Badve am 28 Okt. 2015
Kommentiert: Anup Badve am 28 Okt. 2015
Hi,
I have to remove the all integers which will come after the decimal point. e.g If A=2.789 I want answer A=2, I don't want .789 value

Akzeptierte Antwort

Wanbin Song
Wanbin Song am 28 Okt. 2015
You can use floor function which rounds toward negative infinity.
A = floor(A);

Weitere Antworten (0)

Kategorien

Mehr zu Language Fundamentals finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by