how to prin only integer value in matlab ?

Hello guys, I need some help. I have two output values, etc:
avg=num/2
avg2=num2/2
and first value is for example 94, other 93.5, I need other value to be 94 or 93 not 93.5, can anyone help me ? thanks !

Answers (2)

Is this only for display purposes?
x = 1/7
disp(x)
disp(fix(x))
disp(floor(x))
disp(num2str(x,'%.0f'))

Asked:

on 16 May 2014

Answered:

on 16 May 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!