Is it possible to define the function defined in the following image using the floor function? If so, how?
Update
I tried your suggestion with Matlab's symbolic toolbox,
syms x clear
clear f
f(x)=abs(x-2*floor(x/2));
fplot(f(x),[0,8])
but I got the following picture, which is not correct.


