similar to: Computing the power of a matrix efficiently and accurately

Displaying 20 results from an estimated 200 matches similar to: "Computing the power of a matrix efficiently and accurately"

2013 Apr 09
1
Solving tridiagonal matrix in R
Dear R Users, I am trying to solve a tridiagonal matrix in R. I am wondering if there is an inbuilt R function or package to solve that. I tried looking on google but couldn't find something that would help directly. Any help is highly appreciated. Thanks. Janesh [[alternative HTML version deleted]]
2013 Apr 25
2
Vectorized code for generating the Kac (Clement) matrix
Hi, I am generating large Kac matrices (also known as Clement matrix). This a tridiagonal matrix. I was wondering whether there is a vectorized solution that avoids the `for' loops to the following code: n <- 1000 Kacmat <- matrix(0, n+1, n+1) for (i in 1:n) Kacmat[i, i+1] <- n - i + 1 for (i in 2:(n+1)) Kacmat[i, i-1] <- i-1 The above code is fast, but I am curious about
2005 Nov 14
1
(no subject)
Hi, I am trying to solve a model that consists of rather stiff ODEs in R. I use the package ODEsolve (lsoda) to solve these ODEs. To speed up the integration, the jacobian is also specified. Basically, the model is a one-dimensional advection-diffusion problem, and thus the jacobian is a tridiagonal matrix. The size of this jacobian is 100*100. In the original package
2006 Dec 19
1
preserving sparse matrices (Matrix)
Hi, I have sparse (tridiagonal) matrices, and I use the Matrix package for handling them. For certain computations, I need to either set the first row to zero, or double the last row. I find that neither operation preserves sparsity, eg > m <- Diagonal(5) > m 5 x 5 diagonal matrix of class "ddiMatrix" [,1] [,2] [,3] [,4] [,5] [1,] 1 . . . . [2,] . 1
2003 Oct 01
4
Solving a tridiagonal system
I need to find solutions to a tridiagonal system. By this I mean a set of linear equations Ax = d where A is a square matrix containing elements A[i,i-1], A[i,i] and A[i,i+1] for i in 1:nrow, and zero elsewhere. R is probably not the ideal way to do this, but this is part of a larger problem that requires R. In my application it is much easier (and much faster) to generate the diagonal and
2005 Nov 01
0
PowerPC can not accurately run HTM
I am running HTB on a PowerPC platform and using following script to do rate limit. When I set rate of class 1:11 lower than 4mbit, I can get traffic rate close to the setting. However, if I set the rate higher than 4mbit, I will get much lower bandwidth (roughly 4.5mbit) than the setting, no matter how big the setting is. To verify the script, I run it on PC with then I got correct result. Could
2012 Feb 17
1
[PATCH] x86/mm: Make sure the event channel is released accurately
# HG changeset patch # User h00166998@h00166998.china.huawei.com # Date 1329462865 -28800 # Node ID 9fd12f919ddbd15927117eff42149664dba698ca # Parent b75664e5390583c5d2075c82a14245bc941b3aaf x86/mm: Make sure the event channel is released accurately In xenpaging source code,there is an interdomain communication between dom0 and domU. In mem_event_enable(),the function
2011 Apr 21
1
[PATCH] v2v: More accurately match root choice specified as a specific device
We could potentially have matched a logical volume /dev/ddd/lv_root as a physical block device, and tried to do fuzzy matching on its interface. --- v2v/virt-v2v.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/v2v/virt-v2v.pl b/v2v/virt-v2v.pl index 7c0d7d6..fe07ae9 100755 --- a/v2v/virt-v2v.pl +++ b/v2v/virt-v2v.pl @@ -604,7 +604,7 @@ sub inspect_guest #
2010 Aug 12
5
how to eliminate an element of a list
Hi, I want to eliminate an element of a list: list <- seq(1,5,1) s <- sample(list,1) lets say s=3 Now I want to remove 3 from the list: list2 = {1,2,4,5} Can someone give me a tip? Thanks, André [[alternative HTML version deleted]]
2009 Sep 28
2
Data formatting for matplot
Dear List, I am wanting to produce a multiple line plot, and know I can do it with matplot but can't get my data in the format I need. I have a dataframe with three columns; individuals ID, x, and y. I have tried split() but it gives me a list of matrices, which is closer but not quite what I need. For example: id<-rep(seq(1,5,1),length.out=100) x<-rnorm(100,5,1)
2006 May 26
1
Indexing vector with repeated values
Hi all, I have a vector which contains many repeated values. >Z <- c(1,2,3,4,5,1,2,3,4,5,1,2,3,5,5,2,3,4,5) I need to know how many times each number in this vecetor is repeated. I can use a command like this: > table (cut(Z,seq(1,5,1))) (1,2] (2,3] (3,4] (4,5] 4 4 3 5 But how can I find a break points for vector with random values and random number sequence
2004 Jul 15
1
how to upload [forwarded]
[ This was posted to the R-packages list (which I moderate), but definitely doesn't belong there. Martin Maechler ] ------- start of forwarded message ------- From: Federico Calboli <f.calboli at ucl.ac.uk> To: r-packages at stat.math.ethz.ch Subject: how to upload Date: 15 Jul 2004 18:30:26 +0100 Dear All, I just finished a add on lib called Malmig, to calculate Malecot
2005 Apr 24
1
Biodem 0.1/orphaning of MAlmig
Together with Alessio Boattini of the University of Bologna we have created a package called Biodem. Biodem provides a number of functions for Biodemographycal analysis, and we hope it will be useful to the anthropological community. Because Biodem contains all the functions found in Malmig (a package I maintain), I would like to orphan it, or, even better, have it removed from CRAN. Finally,
2005 Apr 24
1
Biodem 0.1/orphaning of MAlmig
Together with Alessio Boattini of the University of Bologna we have created a package called Biodem. Biodem provides a number of functions for Biodemographycal analysis, and we hope it will be useful to the anthropological community. Because Biodem contains all the functions found in Malmig (a package I maintain), I would like to orphan it, or, even better, have it removed from CRAN. Finally,
2006 Oct 18
1
Calculation of Eigen values.
Dear all R users, Can anyone tell me to calculate Eigen value of any real symmetric matrix which algorithm R uses? Is it Jacobi method ? If not is it possible to get explicit algorithm for calculating it? Thanks and regards, Arun [[alternative HTML version deleted]]
2010 Nov 07
3
Integrate and mapply
Hi, I need some help on integrating a function that is a vector. I have a function - vector which each element is different. And, naturally, function integrate() does not work I checked the article of U. Ligges and J. Fox (2008) about code optimization "How Can I Avoid This Loop or Make It Faster?" on http://promberger.info/files/rnews-vectorvsloops2008.pdf. Their advice did not help
2009 Mar 25
2
Listing of LAPACK error codes
Professor Ripley commented on LAPACK error codes: https://stat.ethz.ch/pipermail/r-help/2007-March/127702.html and says "Internal LAPACK errors are usually problems with arithmetic accuracy, and as such are compiler- and CPU-specific." Is there a listing for the error codes from Lapack routine 'dsyevr'? Especially I am interested about the meaning and handling of error codes 1
2005 Nov 26
1
list.files(recursive=T) does not return directory names
list.files() (and dir()) don't appear to return names of directories when one uses the recursive=T argument. E.g., > dir(file.path(R.home(),"library"), pattern="^R$", recursive=T) [1] "Malmig/help/R" but the unix find commmand finds lots of R directories > z <- system(paste("find", file.path(R.home(),"library"), "-name
2006 Apr 05
2
Problems in package management after Linux system upgrade
I upgraded from Fedora Core 4 to Fedora Core 5 and I find a lot of previously installed packages won't run because shared libraries or other system things have changed "out from under" the installed R libraries. I do not know for sure if the R version now from Fedora-Extras (2.2.1) is exactly the same one I was using in FC4. I see problems in many packages. Example, Hmisc: unable
2008 Apr 13
0
[LLVMdev] Any optimization advantage to making a type-accurate vtable?
Here's another odd question I've been wondering about: Typically a class vtable is an represented as an array of function pointers. Now, since the functions all have different calling signatures, I imagine that you would generate an array of opaque pointers, and then bitcast the pointer to the actual function signature at the call site. However, that's not what I am doing.