Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Solving complex number

Subject: Solving complex number

From: Salvinder

Date: 14 Jan, 2013 13:15:08

Message: 1 of 4

Hie,

I've got a matrix of 2X2 as shown below:

[ 0.6 0.4; 0.7 0.3]^n

when I change the value of n based on integer's I have no problem because I'll get the desired answer, but when n becomes decimal numbers such as 1.2 or 1.25, the solution will have a complex number as a solution. For example the solution would look as shown below:

[ 0.2 + 0.034i 0.6 - 0.2i ; 0.4 - 0.03i 0.7+0.4i]

Is there any possible way of removing the complex numbers?

Thanks,

Subject: Solving complex number

From: Barry Williams

Date: 14 Jan, 2013 19:27:15

Message: 2 of 4

"Salvinder " <salvinder@gmail.com> wrote in message <kd10cs$cv6$1@newscl01ah.mathworks.com>...
> Hie,
>
> I've got a matrix of 2X2 as shown below:
>
> [ 0.6 0.4; 0.7 0.3]^n
>
> when I change the value of n based on integer's I have no problem because I'll get the desired answer, but when n becomes decimal numbers such as 1.2 or 1.25, the solution will have a complex number as a solution. For example the solution would look as shown below:
>
> [ 0.2 + 0.034i 0.6 - 0.2i ; 0.4 - 0.03i 0.7+0.4i]
>
> Is there any possible way of removing the complex numbers?
>
> Thanks,

Are you perhaps trying to do an element by element power:

[ 0.6 0.4; 0.7 0.3].^n

This is different mathematically than taking the power of the matrix. Read the help for Mathematical Operators.

Barry

Subject: Solving complex number

From: Torsten

Date: 15 Jan, 2013 08:02:08

Message: 3 of 4

"Salvinder " <salvinder@gmail.com> wrote in message <kd10cs$cv6$1@newscl01ah.mathworks.com>...
> Hie,
>
> I've got a matrix of 2X2 as shown below:
>
> [ 0.6 0.4; 0.7 0.3]^n
>
> when I change the value of n based on integer's I have no problem because I'll get the desired answer, but when n becomes decimal numbers such as 1.2 or 1.25, the solution will have a complex number as a solution. For example the solution would look as shown below:
>
> [ 0.2 + 0.034i 0.6 - 0.2i ; 0.4 - 0.03i 0.7+0.4i]
>
> Is there any possible way of removing the complex numbers?
>
> Thanks,

No.
Your matrix is diagonizable, but has one negative eigenvalue (-0.1).
Thus complex entries are to be expected when taking a non-integer power of it.

Best wishes
Torsten.

Subject: Solving complex number

From: Roger Stafford

Date: 15 Jan, 2013 09:34:09

Message: 4 of 4

"Salvinder " <salvinder@gmail.com> wrote in message <kd10cs$cv6$1@newscl01ah.mathworks.com>...
> I've got a matrix of 2X2 as shown below:
>
> [ 0.6 0.4; 0.7 0.3]^n
>
> when I change the value of n based on integer's I have no problem because I'll get the desired answer, but when n becomes decimal numbers such as 1.2 or 1.25, the solution will have a complex number as a solution. For example the solution would look as shown below:
>
> [ 0.2 + 0.034i 0.6 - 0.2i ; 0.4 - 0.03i 0.7+0.4i]
>
> Is there any possible way of removing the complex numbers?
- - - - - - - - - -
  When you use fractional powers such as n = 1.2 or 1.25 you will inevitably get multiple solutions, and some or all may be complex-valued. There is no way around that. Even for scalar values this is true. The expression (-1)^(.25) has four possible values and all are complex-valued.

  In your example if you set n = .5, there will be four different solutions to [0.6 0.4;0.7 0.3]^n. One of them is:

 X = [(70+4*sqrt(10)*i)/110 (40-4*sqrt(10)*i)/110;
      (70-7*sqrt(10)*i)/110 (40+7*sqrt(10)*i)/110]

The other three are obtained by altering the signs in X in various combinations, and all are complex-valued.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us