0

Just out of curiosity, I want to plot

$f(x) = 2x$, if $x∈\mathbf{Q}, -5x$ otherwise. Does anyone know of an online plotter that can show this? Alternatively, MATLAB code would be acceptable as well.

Eric
  • 1,632
  • 1
    Note that a computer is not able to even store any irrational number (but only a rational approximation of it). So plotting this function will be difficult. – Surb Nov 23 '19 at 21:10
  • 1
    For a "simpler" exercise: try to draw $\Bbb Q$ on the real line. – Surb Nov 23 '19 at 21:11

0 Answers0