First, you don't need gamma
and coef0
in linear SVM.
Secondly, I think it should be
SVRModel = svm_train(labels, data, options_string);
in your training process.
And you can vectorize the weight and bias terms.
w = model.SVs' * model.sv_coef;
b = -model.rho;