matlab - Prevent from doing decimals -
i summing numbers between 2 indices in matrix, this: ans = sum(my_matrix1x500(100:300));
the ans number like: 351267300.4473 , on. how prevent printing decimals? instead of 351267300.4473 print 3512673004473 or remove decimal, possible?
use fprintf('%.0f',x) print x '0' significant digits, or round(x) remove decimal altogether.
Comments
Post a Comment