Hard to know for sure without seeing your data and the code you ran, but it might be related to the type of model predictions you requested from each function. For example, if you ran a logistic regression using glm in R, the predict function returns predictions on the log-odds scale by default. If you want predictions on the probability scale (i.e., the probability of the outcome, given the predictors), then the code would be predict(model_object, type="response"). See ?predict.glm for details. I haven't used Matlab, but perhaps it uses different defaults.