I wrote this code:
ClearAll[t]
n = 4;
t[0] = 0;
t[n] = 1;
h = N[(t[n] - t[0])/n, 2];
Do[t[L + 1] = t[L] + h;, {L, 0, n - 1}]
A[0][t_] :=
Piecewise[{{1 - (t - t[0])/(t[1] - t[0]), t[0] <= t <= t[1]}}]
A[k_][t_] :=
Piecewise[{{(t - t[k - 1])/(t[k] - t[k - 1]),
t[k - 1] <= t <= t[k]}, {1 - (t - t[k])/(t[k + 1] - t[k]),
t[k] <= t <= t[k + 1]}}];
A[n][t_] :=
Piecewise[{{(t - t[n - 1])/(t[n] - t[n - 1]),
t[n - 1] <= t <= t[n]}}];
Plot[Evaluate[A[#][t] & /@ Range[0, n]], {t, 0, 1},
PlotRange -> {0, 1}, PlotLegends -> "Expressions"]
I want to have scale in distance for Piecewise, for example in the following picture
Ticks -> {t /@ Range[0, n], Automatic}
$\endgroup$