fix 1d discrete function example