## How can I separate complex numbers from the other in a matrix?

### masoud jiryaei (view profile)

on 10 May 2019
Latest activity Commented on by the cyclist

on 18 Jun 2019

### the cyclist (view profile)

Hello
I have a matrix that includes: complex numbers , natural numbers and ...
I want to separate the complex numbers from the other
How can I do this ?
Is there any order in MATLAB ?

### the cyclist (view profile)

on 10 May 2019
Edited by the cyclist

### the cyclist (view profile)

on 10 May 2019

% Example data
z = [1 1+2*i 3 4+5*i]
The variable mask is a logical variable that is TRUE at the locations of the numbers that do not have an imaginary component, and FALSE otherwise.
You'll need to be careful if you have imaginary parts that are within floating-point precision of zero. You might need to use a tolerance, rather than strict equality.

the cyclist

on 10 May 2019
masoud jiryaei

### masoud jiryaei (view profile)

on 18 Jun 2019
Hello,
How can i send a three-dimensional matrix to the Excel?
the cyclist

### the cyclist (view profile)

on 18 Jun 2019
Rather than ask in three different places (two questions, and this comment) within one hour, I suggest you be a little patient and see what answers you get on one question. You already have some suggestions in your questions here and here.