The .sol (solution) file generated also does not contain the decision variables names, only their values.
I found a way to work around this issue, which is
satisfactory for me, but maybe not the easier way of doing things.
After solving the problem in MATLAB, I go to the command window of AMPL. There I load the model, the data and the solution files. Then, I input this command: printf {i in 1.._nvars} "%s= %.16f\n", _varname[i], _var[i] > ("OUTPUT" & ".out");, which generates me a new .out (output) file with the variables names and values.
Thanks a lot for answering Jonathan.