I have a vector $y \in \mathbb{C}^{N \times 1}$ and it expressed as $y = H\times s$, where $H$ is diagonal $N \times N$ matrix to be estimated and $s \in \mathbb{C}^{N \times 1}$. So I formulated that function cost as:
$c(H) = \left \| y - Hs \right \|^2_2$
where I can deal with that case as least square estimator, which can be expressed as:
$H = (s' \times s)^{-1} \times s \times y$
But, what I get here $H$ is a scalar, however, H is supposed to be a vector. What’s the mistake in that case?
Your cost function $c(H) = \sum_{i=1}^n (y_i - h_{ii} s_i)^2$ is separable, so it suffices to minimize each addend $(y_i - h_{ii} s_i)^2$ separately. If $s_i \ne 0$, then you can just set $h_{ii} = y_i/s_i$. If $s_i = 0$, then the value of $h_{ii}$ doesn't matter.