You're missing a semicolon
x = linspace(0,25); y = sin(x/2); yyaxis left; plot(x,y);
% here ^
Or, better yet, use separate lines which greatly increases readability and error detection.
x = linspace(0,25);
y = sin(x/2);
yyaxis left %no semicolon needed this time
plot(x,y);
The error message appeared becaues Matlab interpreted your code as providing an axes input: yyaxis(ax,___)
