help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with acos


From: John W. Eaton
Subject: Re: problem with acos
Date: Wed, 29 Jul 2009 12:22:37 -0400

On 29-Jul-2009, zampala wrote:

| >
| > | I need to calculate the inverse cosine of this matrix (2x2, complex
| > values):
| > | 
| > | P =
| > | 
| > | 9.9422e-01 - 0.0000e+00i 8.9732e+08 - 0.0000e+00i
| > | -1.0151e+00 + 0.0000e+00i 3.0910e+05 - 0.0000e+00i
| > | 
| > | octave:97> acos(P)
| > | ans =
| > | 
| > | 0.10755 - 0.00000i NaN + Infi
| > | 3.14159 - 0.17368i 0.00000 + 13.33457i
| > | 
| > | octave:98> acos(P(1,2))
| > | ans = NaN + Infi
| >
| > Apparently your matrix P has some small imaginary components.  Try
| >
| >   format long
| >   P
| >
| > so that they will be displayed.
| 
| I tried that, but still a long series of zero. However,
| octave:39> isreal(P(1,2))
| ans = 0

What does

  imag (P) == 0

show you?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]