MATLAB: Change font size for second y-axis in plotyy

figurefontsizelablematlab 2015bplotyy

I use the plotyy for some work and need to change the fontsize of the lables so that it's readable in a document later. I know I can use plot browser and property editor to write the text, but i can't change the font size without changing the font size of the ticks. On the main axis I can simply click to label and change the size of the lable without affecting the size of the tick, can't seem to find how to do it with the second axis.
Thanks for help.

Best Answer

This seems to work without affecting the ticks or tick labels:
t = linspace(0, 2*pi);
y1 = sin(t);
y2 = cos(t);
figure(1)
[ax, p1, p2] = plotyy(t, y1, t, y2);
ylabel(ax(1), 'sin(t)')
ylabel(ax(2), 'cos(t)', 'FontSize',20)