matlab代码 y轴反向输出

close all; clear; clc

% x=y/b0; y1=u/V_J; y2=y3=p/0.5*rho*gh
y1 = linspace(0, 1.0, 100);
x = 2/pi*(atan(y1)+atanh(y1))
y2 = exp(-pi*x.^2/4);
y3 = 1-y1.^2

plot(x, y1, 'k-', x, y2, 'r--', x, y3, 'g-')

xlim([0 1.6])
ylim([0 1.0])
set(gca,'xTick',[0:0.2:1.6])
set(gca,'yTick',[0:0.2:1.0])
set(gca,'xticklabel',sprintf('%2.1f\n',get(gca,'xtick')));
set(gca,'yticklabel',sprintf('%2.1f\n',get(gca,'ytick')));
set(gca, 'YDir', 'reverse');

matlab代码 y轴反向输出_第1张图片

你可能感兴趣的:(matlab)