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.


Define the fractional part $\{x\}$ to be $$ x = \left\lfloor x \right\rfloor + \left\{ x \right\}\quad \Rightarrow \quad 0 \le \left\{ x \right\} < 1 $$ note that it does not actually reach to $1$.
Then stretch and shift it so to obtain $$ 1 - 2\left\{ {{x \over 2}} \right\} $$
Finally take the absolute value $$ f(x) = \left| {\,1 - 2\left\{ {{x \over 2}} \right\}\,} \right| = \left| {\,1 - x + 2\left\lfloor {{x \over 2}} \right\rfloor \,} \right| $$