MATLAB: X-label additional text automatically.

figurelabelsmatlab function

Dear all,
I need help about Figures in Matlab. Is it posible to put on x-label two separate texts, for intance one in middle and one od the right edge of figure, but automaticly without command 'text'. For example like in the fig below (I marked it with the red circle):
If I use command xlabel for Frequency then I need to use comand text for (a) and in command tect I need to put cordinates and I do not want to do that for every figure. I need automatical way.

Best Answer

Try something like this:
x = 1:10;
y = randn(1,10);
figure
plot(x,y)
xlabel('Frequency [Hz]')
text(max(xlim), min(ylim)-diff(ylim)*0.1, '(a)', 'HorizontalAlignment','right', 'VerticalAlignment','middle')
It seems to work correctly in my simulations, and appears to produce constant relative positioning of ‘(a)’.