I have not used Matlab, however the following Weka command-line invocation worked for me to discretize the iris data set as a test case.
java -cp jars/weka.jar weka.filters.supervised.attribute.Discretize -i data/iris.arff -o iris-nom.arff -c last
I have stored the weka.jar in a jars/directory using Mac OSX and loaded it via the java classpath option (-cp) in the above command. The arules (association rules) package in R allows R users access to some Weka-like functionality. This package contains the arules::discretize() function that may work for you in R.