peaks; axis tight %Set the axis limits to equal the range of the data axis square axis 'auto x' %x轴坐标上下限自动调整 axis off %Plot a surface without displaying the axes lines and background. set(gca,'Visible','off'); %消除坐标轴,显示范围的大小没有改变,同上句 %更多特性
sigmoid函数图像 x=-10:0.1:10; y=sigmf(x,[1 0]); plot(x,y) 画出的图像如下所示: 怎么将Y轴放在中间呢,而不是在左边? 即如何得到这种效果呢? 方法:新建一个函数:xyplot.m %作用:将Y坐标轴放在中间 function xyplot(x,y) % PLOT plot(x,y); else display(' Not 2D Data set !') end end hold on; % GET TICKS X=get(gca,'Xtick