MATLAB: The integer part of the division simple division hello everyone how do i get the integer part of the output of a division i.e. 23/5=4 (and the remainder is 3) Best Answer fix(23/5) % integer part rem(23,5) % remainder %or mod(23,5) Related SolutionsMATLAB: In documentation it says mod(a,m) will give the remainder of a/m with example mod(23,5) = 3. However 23/5 is 4.6, 4 with a remainder 6 not 3. Whats going on here You are misinterpreting the mod function. Illustrating — num = 23den = 5quotient = fix(num/den)modulus = num - quotient*denproducing: quotient = 4modulus = 3Also: modulus = (num/den - quotient) * denwith the same result. MATLAB: Truncating a number without rounding fix(a*10)/10 Related QuestionFloating point value to integer valueRounding numbers in a specific valuesBug in rounding functions? Who can explain? :)Mod function returns decimal value
Best Answer