this is a Fourier descriptor for a set of points
a =
-3.4173 - 7.1634i
7.4589 + 0.1321i
3.1190 - 2.1870i
-7.1979 + 0.2863i
5.9594 + 0.8209i
-5.4295 -15.7931i
-1.0957 + 3.7485i
0.2657 - 4.1459i
7.4644 - 0.9546i
i need to sum each pair , but when i use a(1) or a(1,1) it produces -3.4173 – 7.1634i
when i use abs(a(1)) or abs(a(1,1)) it also produces 7.9367 which does not make sense for me !
what i need is how to access each element of any pair individually so i get -3.4173 alone and – 7.1634i alone as well so i can do normalization on it !
You have an array of complex numbers, and what you want to do is access the real and imaginary parts of each number.
will result in
randicontaining real and imaginary parts of your descriptor respectively.To understand the reason you get an answer that “doesn’t make any sense” from
abs(a(1)), follow this link.