x=0:0.01:2*pi;
y=sin(x);
plot(x,y)
xlabel('正弦函数')
效果:

xlabel({'正弦函数','sin'})
xlabel({'正弦函数','sin','-2\pi \leq x \leq 2\pi'})

改变大小及加粗
xlabel({'正弦函数','sin','-2\pi \leq x \leq 2\pi'},'FontSize',12,'FontWeight','bold')

改变字体及颜色
xlabel({'正弦函数','sin','-2\pi \leq x \leq 2\pi'}, 'FontSize',12,'FontWeight','bold','color','r','Fontname','STFangSong')

x=0:0.01:2*pi;
y=sin(x);
subplot(2,3,1)
plot(x,y)
xlabel('正弦函数')
subplot(2,3,2)
plot(x,y)
xlabel({'正弦函数','sin'})
subplot(2,3,3)
plot(x,y)
xlabel({'正弦函数','sin','-2\pi \leq x \leq 2\pi'})
subplot(2,3,4)
plot(x,y)
xlabel({'正弦函数','sin','-2\pi \leq x \leq 2\pi'},'FontSize',12,'FontWeight','bold')
subplot(2,3,5)
plot(x,y)
xlabel({'正弦函数','sin','-2\pi \leq x \leq 2\pi'}, 'FontSize',12,'FontWeight','bold','color','r','Fontname','STFangSong')

参考:
https://jingyan.baidu.com/article/19020a0a600645529d284228.html
更多文章请关注《万象专栏》
转载请注明出处:https://www.wanxiangsucai.com/read/cv13695
