xticklabel xtick 在matlab里有什么区别x=-pi:.1:piy=sin(x);plot(x,y)set(gca,'xtick',-pi:pi/2:pi) x=-pi:.1:piy=sin(x);plot(x,y)set(gca,'xticklabel',{'-pi','-pi/2','0','pi/2','pi'}) x=-pi:.1

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/05 02:34:02
xticklabel xtick 在matlab里有什么区别x=-pi:.1:piy=sin(x);plot(x,y)set(gca,'xtick',-pi:pi/2:pi) x=-pi:.1:piy=sin(x);plot(x,y)set(gca,'xticklabel',{'-pi','-pi/2','0','pi/2','pi'})  x=-pi:.1
xUNG~(1H[ܴQ/6NHE UHj S^ƳWBǻKUkHz1?gv3r<ߨG"jm f{gt?n-ȴ6*l ѽJ-O7fZ}ܛIT}zA0 DPđ 4S0B+s?[wn\x./}z`0Pw݉ id8/XdIR|ͿT!+*Sz=u]YFqV%%"MIԖ晴d5M%$ZX0,ģI} a(ZWC2A ) P!Ut;TD\|2Ok(GA}B1a!$  @Ԍi JH Ҟ=Tk/T[I>$r'L \w}xnp# \iCCdM$!VXBJBK# "> I`h֡W4¿r0A l-Г!B Oi4Vflm],b={+?\y>ۥD1.~KuI,eA538wׇtc(cZ?n]1/:6T)f*ճ֞?iYj35u 椯.7+Oښ>覭'6?Pa!v(Kb{c +t^HG~U6i^wl|Vv-g#m

xticklabel xtick 在matlab里有什么区别x=-pi:.1:piy=sin(x);plot(x,y)set(gca,'xtick',-pi:pi/2:pi) x=-pi:.1:piy=sin(x);plot(x,y)set(gca,'xticklabel',{'-pi','-pi/2','0','pi/2','pi'}) x=-pi:.1
xticklabel xtick 在matlab里有什么区别
x=-pi:.1:pi
y=sin(x);
plot(x,y)
set(gca,'xtick',-pi:pi/2:pi)
 
x=-pi:.1:pi
y=sin(x);
plot(x,y)
set(gca,'xticklabel',{'-pi','-pi/2','0','pi/2','pi'})
 

 
x=-pi:.1:pi
y=sin(x);
plot(x,y)
set(gca,'xtick',-pi:pi/2:pi)
set(gca,'xticklabel',{'-pi','-pi/2','0','pi/2','pi'})
 

xticklabel xtick 在matlab里有什么区别x=-pi:.1:piy=sin(x);plot(x,y)set(gca,'xtick',-pi:pi/2:pi) x=-pi:.1:piy=sin(x);plot(x,y)set(gca,'xticklabel',{'-pi','-pi/2','0','pi/2','pi'}) x=-pi:.1
简单点儿说吧:xtick是刻度(小竖线);xticklabel 刻度值(竖线下面的数值).
set(gca,'xtick',-pi:pi/2:pi)这句的意思是:手动设置x轴刻度,-pi到pi之间,每间隔pi/2,划一小竖线;
set(gca,'xticklabel',{'-pi','-pi/2','0','pi/2','pi'})这句的意思是:给刚才划上的小竖线,标个数值.如果你把它改成:set(gca,'xticklabel',{'a','b','c','d','e'}),那么那小竖线下就变成:a,b,c,d,e了.
希望对你有用!