代码:
x = linspace(0,10);
y = sin(x);
hold on
plot(x,y);
stem(0.5*pi,1,'--',"Marker",'.');%画出虚线
%标记x轴和y轴箭头
annotation('arrow',[0.1317 0.1317],[0.1075 0.9753])
annotation('arrow',[0.1308 0.9716],[0.1087 0.1113])
%画出标记箭头和标记点的值
annotation('textarrow',[0.353 0.2556],[0.95 0.9275],'String','(\pi/2,1)')
效果图