n=linspace(0,1,25); y=(n>=0.4&n<0.6); stem(n,y); title('Rectangular Wave'); xlabel('Time index(t)'); ylabel('Amblitude'); grid on;
To embed this project on your website, copy the following code and paste it into your website's HTML: