7
$\begingroup$

How do I plot the following multi case function in wolfram or geogebra?

$$ \begin{eqnarray*} f(x) = \begin{cases} 1, &\text{if }x \text{ is an integer}, \\ 0, &\text{if }x \text{ is not an integer}. \end{cases} \end{eqnarray*} $$

The graph would be dots and underscores?

  • 2
    Here's a piecewise defined function (but the graph isn't what you want -- I'd like to know how to do that as well): "Piecewise[{{1, x == Floor[x]}}, 0]" Link: http://www.wolframalpha.com/input/?i=Piecewise[{{1%2C+x+%3D%3D+Floor[x]}}%2C+0]2011-10-18

1 Answers 1