I can create an rectangular pulse with code
b1 = 5;
a1 = 5;
x = -10:0.01:10;
f = @(xi,a,b) a*rectpuls(xi,b);
I now want to move this pulse, to start from x = -2 and end at x=+3, i.e. not have it centred around zero?
Any idea how to make it so?