11. Given the function $f(x)=x+\frac{4}{x}-1$. If there exist $x_{1}, x_{2}, \cdots, x_{n} \in\left[\frac{1}{4}, 4\right]$, such that
$$
\sum_{i=1}^{n-1} f\left(x_{i}\right)=f\left(x_{n}\right),
$$

then the maximum value of the positive integer $n$ is
11. 6 .
From the problem, we have
$$
f(x)=x+\frac{4}{x}-1 \in\left[3,15 \frac{1}{4}\right] \text {. }
$$

Therefore, when $n$ is as large as possible, the situation is
$$
3+3+3+3+3 \frac{1}{4}=15 \frac{1}{4} \text {, }
$$

at this time, $n=6$.