Normalize columns of matrix with complex data?

I have an array with complex values and I want to normalise the columns. I tried normc(array). But the error is: Data is complex. Is there a way to get around this?

6 Comments

What do you mean by normalise in this context?
sum of the squares of the elements in each column = 1 ( :
@Bonnie: when you tell us what is means to normalize complex numbers, then we can show you how to do it in MATLAB.
The sum of the square of a complex number will still be complex so it can't be 1.
Take each element and multiply by its complex conjugate, so the elements would become real. Square each element and add together. To normalise, divide by sqrt of the sum of the squares.
worked out how to do it in MATLAB! :)

Sign in to comment.

 Accepted Answer

array = array ./ ( sum( ( array .* conj(array) ).^2 ) ).^0.25

1 Comment

@adam Hi, is that the frobenius norm that you're dividing the matrix with?
Thanks

Sign in to comment.

More Answers (0)

Asked:

on 20 Jan 2017

Commented:

on 19 Aug 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!