MATLAB Answers

how separate the complex number as shown in the explain as following?

11 views (last 30 days)
abdullah qasim
abdullah qasim on 4 Jan 2019
Commented: abdullah qasim on 5 Jan 2019
I have a problem with the complex number
comp=a+ib
a1+ib1
a2+ib2
...
...
..
an+ibn
then I separated the real signal about the imaginary signal like this;
real(comp)
imag(comp)
the result is
a
a1
a2
.
.
an
and
b1
b2
.
.
bn
my problem how can I put the sequence the real signal after imag signal as the follow
a
a1
a2
.
.
an
b1
b2
.
.
b2n

  0 Comments

Sign in to comment.

Accepted Answer

KSSV
KSSV on 4 Jan 2019
Simple either concatenate them or use vertcat.
s = rand(100,1)+1i*rand(100,1) ;
iwant = [real(s) ; imag(s)] % concatenate
iant = vertcat(real(s),imag(s)) % use vertcat

More Answers (0)

Sign in to answer this question.


Translated by