clear all close all M=20; Delta = 0.1; x = -5:0.01:5; [y,idx] = quantif(x,M,Delta); plot(x,y); grid; axis([-5 5 -5 5])