Displaying 20 results from an estimated 2000 matches similar to: "diagonal matrix construction"
2011 Apr 04
1
Ordering every row of a matrix while ignoring off diagonal elements
Sorry if this is a stupid question but I've been stuck on how to code
so that I can order rows of a matrix without paying attention to the
diagonal elements.
Say, for example, I have a matrix d:
> d
[,1] [,2] [,3] [,4]
[1,] 0.000000 2.384158 2.0065682 2.2998856
[2,] 2.384158 0.000000 1.4599928 2.4333213
[3,] 2.006568 1.459993 0.0000000 0.9733285
[4,] 2.299886
2012 Dec 19
3
9-STABLE -> NFS -> NetAPP:
I'm running a few servers sitting on top of a NetAPP file server ? everything runs great, but periodically I'm getting:
nfs_getpages: error 13
vm_fault: pager read error, pid 11355 (https)
errors on my screen ? not always same pid ? the annoying part is that it seems to always affect the same jail that is running .. if I shutdown all jails on that physical server, everything shuts down
2010 Apr 23
2
Matrix diagonal help
Hi
Suppose I have a matrix (cohort are rows and years are columns)
[2000] [2001] [2002] [2003]
[C1] 0.01 0.03 0.02 0.09
[C2] 0.06 0.05 0.07 0.11
[C3] 0.1 0.5 0.4 0.98
[C4] 0.7 0.6 0.2 0.77
I want to extracts the diagonals to get a matrix which looks like this (C1
becomes C2 in 2002, C2 becomes C3 in 2003
2009 Aug 24
1
Filling matrix secondary diagonal
Hi,
how do i fill the secondary diagonals of a matrix?
Is there an funktion like the "diag" funktion in matlab, where i can specify
the diagonal i?d like to fill?
--
View this message in context: http://www.nabble.com/Filling-matrix-secondary-diagonal-tp25121745p25121745.html
Sent from the R help mailing list archive at Nabble.com.
2010 Mar 01
1
function odiag(): assigning values to off-diagonal
hi
I'm trying to use the function odiag(x) for matrix calculations. I would
like to assign new values to an off-diagonal in a matrix.
When I use the diag (x) function I could write something like
p<-matrix(seq(1:12),ncol=4)
p.new<-matrix(rep(0,12),ncol=4)
diag(p.new)<-diag(p)
p.new
But this won't work with odiag. How can I turn odiag (x) into something
like diag (x) in order
2000 Mar 15
2
CAST5 encryption
Hello all,
I was wondering if CAST5 encryption is currently being added the
openssh? It's a steller block cipher. No one's found any weaknesses
in it yet and it's free for non profit use.
TTYL
JLC
--
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
2005 Sep 01
1
More block diagonal matrix construction code
Folks:
In answer to a query, Andy Liaw recently submitted some code to construct a
block diagonal matrix. For what seemed a fairly straightforward task, the
code seemed a little "overweight" to me (that's an American stock analyst's
term, btw), so I came up with a slightly cleaner version (with help from
Andy):
bdiag<-function(...){
mlist<-list(...)
## handle case in
2007 Jun 20
1
How to extract diagonals
Hello,
I am using Mac OS X on a power book and R 2.5.0
I try to extract a diagonal from a dissimilarity matrix made with
dsvdis, with this code:
diag(DiTestRR)
But I get this error message:
Fehler in array(0, c(n, p)) : 'dim' spezifiziert ein zu großes Array
english:
Error in array(0, c(n, p)) : 'dim' specifies a too big array.
Is there a limit to extract diagonals?
I
2001 May 19
2
calculations on diagonals of a matrix
Given an nxm matrix A I want to compute the nxm matrix B whose ij-th
element is the sum of the elements of A lying on the diagonal that ends
with element ij, i.e.,
b_ij = a_ij + a_(i-1)(j-1) + a_(i-2)(j-2) + ...
In APL (which I no longer use), I would use the 'rotate' operator to derive
an array whose columns are diagonals of the given array and then cumulate
down columns. Is
2011 Jul 19
2
Taking all "complete" diagonals of a matrix
Hi R-Help!
I am trying to find a nicer way of extracting all the "complete" diagonals
of a matrix. I am working with very large matrices that have many more rows
than columns. I want to be able to extract each of the diagonals that are
as long as the number of columns in the matrix. I have written a rather
ugly function that presently does the job. It illustrates what I am trying
to
2007 Jul 26
0
Diagonal Submatrices Extraction
Yes you are right ... an example is mandatory.
So ... I have a matrix of 0 with just a single 1 per row and per column
I need to extract all maximal 'diagonal' submatrices
Let's say I have the following matrix
A B C D E
a 0 1 0 0 0
b 1 0 0 0 0
c 0 0 1 0 0
d 0 0 0 1 0
e 0 0 0 0 1
well I would like to get, for this example, the two following submatrices
A B C D E
2013 Jan 23
2
setting off-diagonals to zero
The following 1460 x 1460 matrix can be throught of as 16 distinct 365 x 365
matrices. I'm trying to set off-diaganol terms in the 16 sub-matrices with
indices more than +/- 5 (days) from each other to zero using some for loops.
This works well for some, but not all, of the for loops. The R code I"m
using follows. For some reason the third loop below zero's-out everything
in the
2007 Oct 10
3
as.dist with diagonal unequal zero
Hello and sorry that I still haven?t found a solution for my problem.
I need to extract the lower and upper triangle from a square matrix
including the diagonal. This diagonal is not zero in that special case.
I tried with as.dist
w<-as.dist(w, diag = TRUE)
> w
1 2 3 4 5
1 0
2 2 0
3 3 8 0
4 4 9 14 0
5 5 10 15 20 0
but found no way to keep the diagonal that is in the
2011 Feb 25
1
Accessing sub diagonals / spdiag in R ?
Hello, I'm attempting to access a specific number of sub diagonals in a
MATRIX and have been accustomed to using spdiags in MATLAB or Octave. I've
got a solution pieced together using for loops and it works though isn't
vectorized and liable to run very slow
for large matrices.
As an example:
A =
1 2 3 4 5
9 8 7 6 5
4 5 6 7 8
5 4 3 2 1
8 7 6 0 1
The subdiagonals are: 9,5,3,0 4,4,6
2003 Jul 27
1
Drawing boxplots in pairs function
I tried the following command to produce boxplot of diagonals in pairs
function:
> pairs(t1.5,diag.panel=boxplot)
Error in pairs.default(t1.5, diag.panel = boxplot) :
The panel function made a new plot
The graphics device draws two graphs, one with a rectangle at (1,1) in 7x7
layout and the other with boxplot(t1.5$wind) at (1,2).
pairs function help file has a similar example with
2013 Apr 18
0
Splitting vector
Hi,
Try:
vec1<- "mue#d/sjbijk at ruepvnvbnceiicrpgxkgcyl@keduhqvqi/ubudvxopddpfddgitrynzshzdcwgneyffrkpbxwilwqngrsals#geqmtkcpkp/qecgdfa#uag"
library(seqinr)
?res<-lapply(0:4,function(i) lapply(2:5,function(j) splitseq(s2c(gsub("[#@/]","",vec1)),word=j,frame=i)))
#or
library(stringr)
res1<-lapply(0:4,function(i) lapply(2:5,function(j)
2010 Oct 21
4
how do I make a correlation matrix positive definite?
Hi,
If a matrix is not positive definite, make.positive.definite() function in corpcor library finds the nearest positive definite matrix by the method proposed by Higham (1988).
However, when I deal with correlation matrices whose diagonals have to be 1 by definition, how do I do it? The above-mentioned function seem to mess up the diagonal entries. [I haven't seen this complication, but
2008 Feb 26
2
Summing up diagonals w/o for-loop
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080226/43b3a38b/attachment.pl
2012 Apr 12
3
writing spdiags function for R
Dear R-list,
I am in the process of translating a long function written in Matlab
into R (mainly because I am a big of fan of R, and folks will not
have to pay to use it :). In the translation of this function
I got stack because they use spdiags, which, as far as I can tell
it is not available in R. I have explored the Matrix package, from
which I borrowed some of the functions (e.g.,
2008 Nov 21
2
Extracting diagonal matrix
Dear All,
I have a correlation matrix of size 100 x 100 and would like to extract the diagonal matrix from it. I have used the for loop to store tha correlation values of the diagonal matrix. Is there a 'R way' of doing this?
Thanks in advance.
Kind regards,
Ezhil