how to make a smooth curve in matlab. Create a categorical array