Info

This question is closed. Reopen it to edit or answer.

i want a programme to approximate decimal to number by using if statement

1 view (last 30 days)
i want a programme to approximate decimal to number by using if statement
EX:
if I have 2.1 or 2.3 or 2.3 or 2.4
I want the answer to be 2
and if i have 2.5 till to 2.9
I want the answer to be 3
but the number is variable
I mean (2) can be 1,2,3,4,.....and so on
any number i can enter it

Answers (0)

Community Treasure Hunt

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

Start Hunting!