I have a vector $ \mathbf{h} $ of size $ 1 \times M $, where each component is a complex number. How do I calculate $ \| \mathbf{h} \|^{2} $ and $ \| \mathbf{h} \|^{4} $?
For example, I use Matlab to generate $ \mathbf{h} $ such that
M=10;
h=randn(1,M)+1i*randn(1,M);
Can someone help me to calculate $ \| \mathbf{h} \|^{2} $ and $ \| \mathbf{h} \|^{4} $?
Added: I tried following after Ross's answer:
h2=h*h'
h4=h2^2
Hope these give solutions?
M=3;
h=(randn(1,M)+1i*randn(1,M))
ht=h'
h2=h*ht
h4=h2^2
h =
0.4889 - 0.3034i 1.0347 + 0.2939i 0.7269 - 0.7873i
ht =
0.4889 + 0.3034i
1.0347 - 0.2939i
0.7269 + 0.7873i
h2 =
2.6362
h4 =
6.9497
For $||{\bf h}||^2$ you sum the absolute squares of the components, where you multiply each by its complex conjugate. For $||{\bf h}||^4$ you just use $(||{\bf h}||^2)^2$