Plotting functions in Julia is quite easy and works super nice for smooth functions. However, for more complex functions (switched), some points get lost.
f(x) = 0.6 > mod(x,1) > 0.5 ? 1 : 0
plot(f, xlims=(0,10))
Is there an easy way to control the sampling of the function without having to explicitly generate the x
and f(x)
vectors?