MATLAB: How to remove integers after the decimal points data acquisition 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 Best Answer You can use floor function which rounds toward negative infinity.A = floor(A); Related SolutionsMATLAB: How can I convert a decimal to an integer fix to strip all the decimalsround can change the integer partfix (1.9) % 1round(1.9) % 2 MATLAB: Decimals C ~= round(C)will return 1 for any position that is not an integer.You may also want to try something likefprintf('%.99g\n', C) Related QuestionRounding to next integerDecimalInteger from the decimalHow to remove the decimal part in matlabGrabbing number after decimalHow to drop decimal values without rounding off
Best Answer