jeudi 23 juin 2016

Given a positive number , how to determine its surrounding integers in matlab

Can someone please explain how to get the surrounding integers for a given positive number ( for ex. if number is 18.2378 then it should return 18 and 19 )

(I actually need this to determine that the given number is between 0-1 or 2-3 or 4-5 and so on....and if it is in between 0-1 or 2-3 or 4-5 etc then some expression evaluates , else some other expression must evaluate.)

Aucun commentaire:

Enregistrer un commentaire