reads files in LIBSVM format
[label_vector, instance_matrix] = readsparse('data.txt');
Two outputs are labels and instances, which can then be used as inputs of svmtrain or svmpredict.