I want to create a function which only accepts integers. if a value other than integers are given it should output zero. This is what I've tried so far. I'm trying to do some discrete time signal experiments like time shifting.
specifically i want to create a function y[n] = u[n] - u[n-5] and create another using it, x[n] = y[n/2] + 2 y[n/2-1/2] so that i can get the following graph,
Here's my copy paste-able code: https://www.wolframcloud.com/objects/a0b8ba05-a8cc-4cae-a075-6435e301d41a
y[n_ /; IntegerQ[n]] := ...$\endgroup$