search for: 0i

Displaying 20 results from an estimated 159 matches for "0i".

Did you mean: i0
2005 Feb 16
3
real and complex vectors
The following caught me off-guard: R> z <- 1i + 1:10 R> z <- Re(z) R> z [1] 1 2 3 4 5 6 7 8 9 10 as expected. But look: R> z <- 1i + 1:10 R> make.real <- abs(z) < 1000 R> z[make.real] <- Re(z[make.real]) R> z [1] 1+0i 2+0i 3+0i 4+0i 5+0i 6+0i 7+0i 8+0i 9+0i 10+0i R> didn't make z a real vector, which is what I wanted. ?"[<-" says If one of these expressions appears on the left side of an assignment then that part of 'x' is set to the value of the right han...
2006 May 26
1
Building V2.3.0 on Tru64 V5.1B
Hi, I am going to be attempting a build of R for the alphas (our main need is to collate and present graphically, performance metrics we gather on our applications). We have: CC=cc, CXX=cxx, Fortran V5.51 (f77, f95), GNU make 3.80, Perl 5.8.4 I am hesitant to rebuild GCC on this platform, and would like to know if others have success in building R with native C, C++ and Fortran. I plan on
2009 Nov 23
1
R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails
...forge.r-project.org/projects/expm/ > >But that matrix is not negative definite! It has 2 positive and one >negative eigenvalue. It is non-positive definite. > >It is fairly easy in any case to get a matrix square root from the eigen >decomposition: > > > v%*%diag(sqrt(d+0i))%*%t(v) > [,1] [,2] [,3] >[1,] 0.5164499+0.4152591i -0.1247682-0.0562317i -0.7257079+0.3051868i >[2,] -0.1247682-0.0562317i 0.9618445+0.0076145i 0.3469916-0.0413264i >[3,] -0.7257079+0.3051868i 0.3469916-0.0413264i 1.0513849+...
2006 Jan 12
0
bug in qr.coef() and (therefore) in qr.solve (PR#8476)
...version of qr.coef, with the two lines in question changed as above (and no other modifications). Examples: > A <- matrix(rnorm(9),3,3) > B <- matrix(rnorm(9),3,3) > solve(A+1i*B,A+1i*B) [,1] [,2] [,3] [1,] 1.000000e+00+0.000000e+00i -1.853360e-17-1.199306e-17i 0+0i [2,] 2.338819e-17-1.192988e-19i 1.000000e+00+1.155338e-20i 0+0i [3,] -6.940188e-18+1.120842e-17i 5.188659e-17-3.226848e-17i 1+0i > qr.solve(A+1i*B,A+1i*B) [,1] [,2] [1,] 1.000000e-00-2.583088e-16i 1.000000e-...
2008 Jun 03
3
matlab eigs function in R
Hello Does anybody know how one can compute d largest eigenvalues/eigenvectors in R, like in MATLAB eigs function ? eigen function computes all eigenvectors/eigenvalues, and they are slightly different than those generated by matlab eigs. Thanks in advance -- View this message in context: http://www.nabble.com/matlab-eigs-function-in-R-tp17619641p17619641.html Sent from the R help mailing list
2001 Jan 17
2
PR#751
...51). I have had some difficulty using the polyroot() function. For example, in Win 98, R 1.1.1, > polyroot(c(2,1,1)) correctly (per the help index) gives the roots of 1 + (1*x) + (2*x^2) as [1] -0.5+1.322876i -0.5-1.322876i However, > polyroot(c(-100,0,1)) gives the roots of [1] 10+0i -10+0i which corresponds to -100 + x^2, not 1 - (100*x^2). Also, > polyroot(c(0,0,0,1)) gives [1] 0+0i 0+0i -10+0i which aren't all roots of x^3. Thanks for all your efforts. I apologize if I'm missing something. Kristian Markon -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2010 Mar 25
2
print(big+small*1i) -> big + 0i
...s of a complex number be printed to the same precision? The imaginary part of 0 looks a bit odd when log10(real/imag) >=~ getOption("digits"), but I'm not sure it is awful. Some people might expect the same number of significant digits in the two parts. > 1e7+4i [1] 10000000+0i > 1e7+5i [1] 10000000+0i > 1e10 + 1000i [1] 1e+10+0e+00i > getOption("digits") [1] 7 > options(digits=4) > 1e4+4i [1] 10000+0i > 1e7+1000i [1] 10000000+0i > version _ platform i386-pc-mingw32 arch i386 os mingw32 system...
2006 Jan 18
1
function 'eigen' (PR#8503)
...is-behaviour of the function 'eigen' in 'base', for the following input matrix: A <- matrix(c(2,3,4,-1,3,1,1,-2,0),3,3) eigen(A) I obtain the following results, which are incorrect for eigenvalues and eigenvectors 2 and 3 (incorrect imaginary portions): $values [1] 3+0.000000e+00i 1+1.869518e-08i 1-1.869518e-08i $vectors [,1] [,2] [,3] [1,] -0.5345225+0i 4.720910e-17+2.643897e-09i 4.720910e-17-2.643897e-09i [2,] -0.2672612+0i 7.071068e-01+0.000000e+00i 7.071068e-01+0.000000e+00i [3,] -0.8017837+0i 7.071068e-01-2.6438...
2009 Nov 25
1
R: Re: R: Re: chol( neg.def.matrix ) WAS: Re: Choleski and Choleski with pivoting of matrix fails
...t matrix is not negative definite! It has 2 positive and one >>> negative eigenvalue. It is non-positive definite. >>> >>> It is fairly easy in any case to get a matrix square root from the eigen >>> decomposition: >>> >>>> v%*%diag(sqrt(d+0i))%*%t(v) >>> [,1] [,2] [,3] >>> [1,] 0.5164499+0.4152591i -0.1247682-0.0562317i -0.7257079+0.3051868i >>> [2,] -0.1247682-0.0562317i 0.9618445+0.0076145i 0.3469916-0.0413264i >>> [3,] -0.7257079+0.3051868...
2017 Mar 17
4
Hyperbolic tangent different results on Windows and Mac
Dear all, We seem to have found a "strange" behaviour in the hyperbolic tangent function tanh on Windows. When running tanh(356 + 0i) the Windows result is NaN + 0.i while on Mac the result is 1 + 0i. It doesn't seem to be a floating point error because on Mac it is possible to run arbitrarily large numbers (say tanh( 999999677873648767519238192348124812341234182374817239847812738481234871823+0i) ) and still get 1 + 0i as re...
2017 May 04
2
complex tests failure
...old versions of the GNU C standard library; this seems relevant. The discussion by Martin Maechler suggest "using R's internal substitute". So how do I enable this? Or does this requires updating the C standard library? ** From complex.Rout.fail > stopifnot(identical(tanh(356+0i), 1+0i)) Error: identical(tanh(356 + (0+0i)), 1 + (0+0i)) is not TRUE In addition: Warning message: In tanh(356 + (0+0i)) : NaNs produced in function "tanh" Execution halted Best, Kasper [[alternative HTML version deleted]]
2005 May 16
1
branch cuts of atan()
Hi the following gave me a shock: > atan(2) [1] 1.107149 > atan(2+0i) [1] -0.4636476+0i > or, perhaps more of a gotcha: > atan(1.0001+0i) [1] -0.7853482+0i > atan(0.9999+0i) [1] 0.7853482+0i > evidently atan()'s branch cuts aren't where I thought they were. Where do I look for documentation on this? -- Robin Hankin Uncertainty Analys...
2010 Jan 21
0
Using spec.ls to interpolate very long time series
...1.143118e-04 1.428898e-04 [6] 1.714678e-04 2.000457e-04 2.286237e-04 2.572016e-04 2.857796e-04 I would like to do an inverse fft using these frequencies so that I can recreate the interpolated time series. But when I do: >fft(fft(ts_lomb))/length(ts_lomb) I get: ... [17485] 0.00037151349-0i 0.00034293553-0i 0.00031435757-0i 0.00028577961-0i [17489] 0.00025720165-0i 0.00022862369-0i 0.00020004572-0i 0.00017146776-0i [17493] 0.00014288980+0i 0.00011431184-0i 0.00008573388-0i 0.00005715592-0i My question: 1) The numbers don't make sense to me. Shouldn't I have both cosine and...
2007 Aug 28
3
Interpreting the eigen value of a population matrix (2nd try)
...ulation. My problem is that I want to have the 95% confidence interval of the specific lambda (1.056 in the case). Is there a way to do that? Are the other eigen value shown in the output could help me doing it. I would very appreciate any help. Thanks for your time $values [1] 1.0561867+0.0000000i 0.0749653+0.5249157i 0.0749653-0.5249157i [4] 0.4498348+0.0795373i 0.4498348-0.0795373i -0.3357868+0.0000000i $vectors [1,] -0.72849129+0i -0.11058308+0.3293511i -0.11058308-0.3293511i 0.00244042+0.03012017i 0.00244042-0.03012017i [2,] -0.41384232+0i 0.35124594+0.1765638i 0.35124594-0.1765638i 0.01...
2013 Jun 18
1
eigen(symmetric=TRUE) for complex matrices
...te: jj <- matrix(0,100,100) A <- exp(-0.1*(row(jj)-col(jj))^2) A's being positive-definite is important to me: > min(eigen(A,T,T)$values) [1] 2.521153e-10 > Coercing A to a complex matrix should make no difference, but makes eigen() return the wrong answer: > min(eigen(A+0i,T,T)$values) [1] -0.359347 > This is very, very wrong. I would expect these two commands to return identical values, up to numerical precision. Compare svd(): > dput(min(eigen(A,T,T)$values)) 2.52115250343783e-10 > dput(min(eigen(A+0i,T,T)$values)) -0.359346984206908 > dput(min(sv...
2017 May 04
2
complex tests failure
...is seems relevant. The discussion by Martin Maechler suggest "using R's >> internal substitute". So how do I enable this? Or does this requires >> updating the C standard library? >> >> ** From complex.Rout.fail >> >> stopifnot(identical(tanh(356+0i), 1+0i)) >>> >> Error: identical(tanh(356 + (0+0i)), 1 + (0+0i)) is not TRUE >> In addition: Warning message: >> In tanh(356 + (0+0i)) : NaNs produced in function "tanh" >> Execution halted >> >> Best, >> Kasper >> >>...
2007 Feb 09
2
Wine does nothing Help !!!!!
...[], 8) = 0 [pid 16929] rt_sigprocmask(SIG_BLOCK, [HUP INT USR1 USR2 ALRM CHLD IO], [], 8) = 0 [pid 16929] writev(3, [{"\232\0\0\0\n\1\0\0\0\0\0\0*\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 64}, {"E\0v\0e\0r\0e\0s\0t\0 \0D\0i\0c\0t\0i\0o\0n\0a\0r\0y\0 \0S\0e\0t\0u\0p\0 \0i\0s\0 \0p\0r\0e\0p\0a\0r\0i\0n\0g\0 \0t\0h\0e\0 \0I\0n\0s\0t\0a\0l\0l\0S\0h\0i\0e\0l\0d\0 \0W\0i\0z\0a\0r\0d\0,\0 \0w\0h\0i\0c\0h\0 \0w\0i\0l\0l\0 \0g\0u\0i\0d\0e\0 \0y\0o\0u\0 \0t\0h\0r\0o\0u\0g\0h\0 \0t\0h\0e\0 \0p\0r\0o\0g\0r\0a\0m\0 \0s\0e\0t\0u\0p...
2002 Apr 23
2
Bug in read.table() (PR#1477)
The following command, temp <- read.table("c:/rfr/r/test.txt") reads the text file "test.txt", which contains the following lines: 21437 21438 21419-2 21420-2 21421-2 21422-2 and produces the following result: > temp V1 1 21437+0i 2 21438+0i 3 0+0i 4 0+0i 5 0+0i 6 0+0i > These "numbers" are actually sample ID's, and I expected the presence of the hyphen would cause temp to be character or a factor, but it ends up as complex numbers. System info: platform i386-pc-mingw32 arch x86...
2012 Jan 30
2
Euler identity with complex exp
Hi, Am i doing something silly here in expecting Euler's formula to be handled by exp? exp( ix ) = cos x + i sin x. The first example below follows this, the others not. Thanks for the education! > exp( complex(real = 0, imag = 2*pi) ) [1] 1-0i > exp( complex(real = pi, imag = 2*pi) ) [1] 23.14069-0i > exp( complex(real = pi/2, imag = 0) ) [1] 4.810477+0i [[alternative HTML version deleted]]
2017 Mar 21
0
Hyperbolic tangent different results on Windows and Mac
...>> Rodrigo Zepeda <rzepeda17 at gmail.com> >>>>> on Fri, 17 Mar 2017 12:56:06 -0600 writes: > Dear all, > We seem to have found a "strange" behaviour in the hyperbolic tangent > function tanh on Windows. > When running tanh(356 + 0i) the Windows result is NaN + 0.i while on Mac > the result is 1 + 0i. It doesn't seem to be a floating point error because > on Mac it is possible to run arbitrarily large numbers (say tanh( > 999999677873648767519238192348124812341234182374817239847812738481234871823+0i)...