search for: nxn

Displaying 20 results from an estimated 61 matches for "nxn".

Did you mean: non
2004 Dec 12
2
Help : generating correlation matrix with a particular structure
Hi, I would like to generate a correlation matrix with a particular structure. For example, a 3n x 3n matrix : A_(nxn) aI_(nxn) bI_(nxn) aI_(nxn) A_(nxn) cI_(nxn) aI_(nxn) cI_(nxn) A_(nxn) where - A_(nxn) is a *specified* symmetric, positive definite nxn matrix. - I_(nxn) is an identity matrix of order n - a, b, c are (any) real numbers Many attempts have been unsuccessful because a resulting matrix with...
2009 Feb 11
4
Efficent way to create an nxn upper triangular matrix of one's
The code below create an nxn upper triangular matrix of one's. I'm stuck on finding a more efficient vectorized way - Thanks. --Dale n <- 9 data <- matrix(data=NA, nrow=n, ncol=n) data for (i in 1:n) { data[,i] <- c(rep(1,i), rep(0,n-i)) } data
2004 Dec 13
1
Re: Help : generating correlation matrix with a particular
...at biostat.ku.dk> >Content-Type: text/plain; charset=us-ascii > >Siew Leng TENG <siewlengteng at yahoo.com> writes: > >> Hi, >> >> I would like to generate a correlation matrix with a >> particular structure. For example, a 3n x 3n matrix : >> A_(nxn) aI_(nxn) bI_(nxn) >> aI_(nxn) A_(nxn) cI_(nxn) >> aI_(nxn) cI_(nxn) A_(nxn) >> >> where >> - A_(nxn) is a *specified* symmetric, positive >> definite nxn matrix. >> - I_(nxn) is an identity matrix of order n >> - a, b, c are (any) real numbe...
2011 May 29
1
constructing nxn matrices involving calculations& conditions based on other tables
Dear R-users, I am having trouble constructing nxn matrices involving calculations& conditions based on other tables. Below I describe a simple example of what I am trying to do: Given the Table A (n x m): Species1 Species2 X A1,1 A1,2 Y A2,1 A2,2 Z A3,1 A3,2 I want to create a matrix M (n xn) X Y Z X - M1,2 M1,...
2010 May 20
0
zfs unmount returns with Invalid Argument
...just deleted the directory and say told zfs to Mount it again. This worked fine. Everything shows up mounted fine. The directory is empty though. Not really a problem since I still have the data so I thought I would just unmount the thing and start again. >zfs unmount rpool/export/home/nxn/.VirtualBox cannot unmount ''/export/home/nxn/.VirtualBox/VDI'': Invalid argument >zfs unmount rpool/export/home/nxn/.VirtualBox/VDI cannot unmount ''/export/home/nxn/.VirtualBox/VDI'': Invalid argument >zfs unmount -f rpool/export/home/nxn/.VirtualBox/VDI...
2004 Jul 01
1
QR decomposition question
Hi all, I wonder if this kind of questions are ok in this list... Quick question: What does it mean than the rank of the QR decomposition of a NxN matrix is N-1 ? m: NxN matrix qr(m)$rank equal to (N-1) Long version: I'm doing a manova on a matrix of 10 variables and 16 observations. > dim(tmp) [1] 16 10 > fit <- manova( tmp ~ treatment*mouse ) >results <- summary(fit,test="Wilks") ... residuals hav...
2009 Aug 21
4
help with median for each row
Hi, I tried looking through google search on whether there's a way to computer the median for each row of a nxn matrix and return the medians for each row for further computation. And also if the number of columns in the matrix are even, how could I specify which median to use? Thank you very much! -- Edward Chen [[alternative HTML version deleted]]
2006 Jul 04
5
removing for loop
Dear Rusers, Trying to reduce my for loops addiction, could somebody tell me if there are ways to simplify (and perhaps accelerate ?) the following line for (i in 1:N) for (j in 1:N) m[i,j] = b[i]-b[j]; (where m is a NxN matrix and b a vector of length N) Thanks for any hint.
2003 Mar 31
3
monte carlo method for circle area
...t.. I ve got an assignment which consists in calculating the area of a circle given a certain radius and center using the monte carlo method, which means that I have to plot a circle given its parameters. Limit the area inside it...with as many sample points as possible...and all of this inside a nxn size window, which could be 1x1, or any size actually. I wonder how I could just limit the area inside the circle..that would be great help for me. Some of you have given me several suggestions about plotting a circle using some built-in functions but I wonder if its suits my problem since I have t...
2011 Dec 15
3
From Distance Matrix to 2D coordinates
Dear All, I am struggling with the following problem: I am given a NxN symmetric matrix P ( P[i,i]=0, i=1...N and P[i,j]>0 for i!=j) which stands for the relative distances of N points. I would like use it to get the coordinates of the N points in a 2D plane. Of course, the solution is not unique (given one solution, I can translate or rotate all the points by...
2009 Oct 03
2
Calculating the average after adding 3 matrices
Hi all, Here is my problem: I have 3 matrices , A, B, C. Each is an nXn matrix. I need to create matrix D such that : D[i,j]= (A[i,j]+B[i,j]+C[i,j])/3. Being a newbie this is proving to be a challenge. Any ideas on how best to accomplish this? Thanks! Anjan -- ============================= anjan purkayastha, phd bioinformatics analyst whitehead institute for biomedi...
2009 Aug 20
2
Geometric mean of rows in matrix
Is there a function or an easier way to computer geometric means of each rows in a nxn matrix and spit out in an 1xn matrix ? -- Edward Chen [[alternative HTML version deleted]]
2010 Oct 19
2
head.matrix() unintelligent
Hi Just a simple question really. I?ve got these large 2d matrices that I?d like to inspect, but not from start to finish. The head() command is convenient when columns are few. For large nxn matrices, however, head() and head.matrix() are still cumbersome. Is there a simple way of viewing both the columnwise and rowwise heads of a matrix? cheers, Bruce -- View this message in context: http://r.789695.n4.nabble.com/head-matrix-unintelligent-tp3002346p3002346.html Sent from the R hel...
2020 Jul 05
5
[RFC] carry-less multiplication instruction
...//raw.githubusercontent.com/riscv/riscv-bitmanip/master/bitmanip-0.92.pdf >> [3] https://www.bearssl.org/constanttime.html > > What benefit would this intrinsic would bring to the middle-end IR, > over it's current naive expanded form? Isn't a "naive" expansion of NxN carryless multiply extremely involved? I'd expect something like 2N shifts, N truncs, N selects, and N xors. That link mentions an alternative that is more efficient, but I wouldn't exactly call it naive... Cheers, Nicolai > > Note that teaching backends to produce it, or even...
2007 Jun 14
3
Retain names in conversion of matrix to vector
Hi R-listers, I'm using R only for a few basic functions but am having difficulty doing something that *should* be simple. I have an nxn matrix, Q, where Q[i,j] is a directed value (in this case, oil exports from i to j). Note that Q[i,j]~=Q[j,i]. I imported column names along with the matrix then copied them to the rows using rownames(Q) <- colnames(Q). Simple so far. What I'd like to do now is convert Q for export into a v...
2001 Dec 31
2
Extracting/setting elements from/in a matrix/array
Dear all, I had to extracts/set elements from/in a matrix. Let say I have two vectors dim1 and dim2 of indices in the respective two dimensions of a matrix: I want to extract all the corresponding elements. I the case of a nxn matrix, dim1 <- 1:n and dim2 <- 1:n would extract the diagonal. I know one way would be to use the functions 'row' and 'col', but the matrixes I have are can be rather large. This is probably a detail but I was looking for something that would avoid be bit more memory friendl...
2006 Apr 06
4
weighted kernel density estimate
...on the genetic structuring within a population. For this I had thought to prepare a kernel density estimate map showing the spatial distribution of individuals, while incorporating the genetic distances among individuals. I have a dataset of locations of N unique individuals (XY-coordinates) and an NxN matrix with the genetic distances given as a fraction between 0 and 1. As far as I understand the methodology, a kernel density estimate works with the geographic distance matrix. My idea was to somehow incorporate the genetic distance matrix (e.g. as an among-individual-based smoothing factor???)...
2014 Jun 13
2
Crear matriz binaria
Hola, Estoy tratando de crear una matriz cuadrada, binaria y no tengo idea por dónde comenzar. Los datos que tengo son patentes e inventores por patente, las patentes las identifico por su código y a los inventores por nombre y también los tengo codificados. Deseo hacer una matriz de nxn en donde los renglones son inventores de la A a la Z y columnas son los mismos inventores de la A a la Z, las entradas de la matriz corresponderán a 1 si el inventor A tiene una patente con el inventor K?L?M, cualquier otra situación será cero. Evidentemente la matriz debe tener ceros en la diagona...
2004 Jul 01
1
QR decomposition and rank of a matrix
In summary.manova the qr decomposition of a NxN matrix is calculated and for some cases is giving me a rank < N. However, following suggestions of professor Ripley to calculate the rank of a Matrix On 7 Jun 2002, Brian Ripley wrote: > For a more reliable answer, look at the SVD > (function svd) and look at the > singular v...
2004 Oct 28
1
transitivity
Dear all, Is there a function in R that checks transitivity and acyclicity of a given nXn matrix with entries representing a decision-maker's comparisons of n objects? Like 0 1 0 1 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 represents xPy and 0 represents ~xPy. Is there a vectorized solution to this? n can be quite large. Thanks in advance, Alex