Just one comment.
I just realized that when using the following command:
sim (mdl_name); (mdl_name is a variable with the name of the simulink model)
The Results variable is created.
However, with the following command: sim (mdl_name, 'StopTime', '5');
The Results variable is not created but the 'ans' object I mentioned before