Hi Daniel,
I understand that you are trying to add a new line to “XTickLabel” values using character vector ‘\newline’.
To achieve this, you can change the value of the “TickLabelIntepreter” property of axes from ‘none’ to ‘tex’.
ax(1).TickLabelInterpreter = 'tex';
For more information, please refer to the following documentation.
Hope this solves your query.