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

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

sql - MySQL - Finding Empty relations -

linux - gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now -