Square Wave Function In Matlab