将空白新笔记本粘贴并评估
L = 1;
bWidth = L/5;
v0 = 50;
vL = 4;
vD = 6;
v[x_] := 1 /; x < 0;
v[x_] := 1 /; x > L;
v[x_] := v0 /; (L - bWidth)/2 < x < (L + bWidth)/2;
v[x_] := vL /; 0 < x < (L - bWidth)/2;
v[x_] := vD /; (L + bWidth)/2 < x < L;
Plot[v[x], {x, -.25, 1.25}, PlotRange -> All]