As correctly pointed out in Richard Lyons' answer, some small numerical error is to be expected with most implementations.
On way to reduce these numerical errors (and completely avoid the error on the odd coefficients) would be to use the trick documented in this paper to efficiently compute the coefficients of your half-band filter. To summarise this paper, a half-band filter with $N = 4m-1$ coefficients can be generated from a full-band filter design with $2m$ coefficients $g(n)$ using the relation:
$$
h(n) =
\begin{cases}
0.5g\left(\frac{n}{2}\right) & n \, \mbox{even}\\
0 & n \,\mbox{odd}, n\neq \frac{N-1}{2}\\
0.5 & n = \frac{N-1}{2}\\
\end{cases}
$$
Note that the odd coefficients (or even coefficients in one-based indexing) will then be 0 by construction.
Following the referenced paper, half-band filters must have an odd number of coefficients $N$ (which must then be of the form $N = 4m \pm 1$, for some positive integer $m$). Also, filters with $N=4m+1$ coefficients can be reduced to a filter with only $N=4m-1$ coefficients by eliminating the resulting zero coefficients at the first and last indices.
Thus we only need to focus on the design of filters with $N=4m-1$ coefficients (i.e. filters of order $4m$), which can be achieved with the following Matlab script:
if (0 == rem(N,2))
disp("Number of coefficients needs to be odd (even order)");
else
M = floor((N+1)/4);
K = 2*M;
% design full-band filter
g = firpm(K-1, 4*[0 .23], [1 1], [1]);
% convert to half-band filter
offset = 0;
if (1 == rem(N,4))
disp("Warning: tail coefficients will be zero (effective order reduced by 2)");
offset = 1;
end
hn = zeros(1,N);
hn((1+offset):2:(K-1+offset)) = 0.5*g(1:M);
hn(K+offset) = 0.5;
hn((K+1+offset):2:N) = 0.5*g(M+1:K);
end
Finally for Scilab, you should be able to get the same result (although I do not have Scilab handy to test it) as the above Matlab script by replacing the firpm
call with
g = eqfir(K, 2*[0 .23], [1], [1]);