Displaying 5 results from an estimated 5 matches for "p1a".
Did you mean:
p1
2013 Dec 16
2
vectorizaciones
...con matrices que lleva un doble bucle. He
intentado vectorizarlo pero sin mucho éxito con la función "Vectorize".
¿sabríais de alguna manera de evitar los bucles o de que funcionase Vectorize?
Adjunto un ejemplo
#...................
vec1a <- as.vector(1:3)
n1a <- 3
n2a <- 3
P1a <- matrix(rnorm(30),nrow=3)
P2a <- matrix(rnorm(30),nrow=3)
Ka <- 10
# En forma de funcion
producto <- function(n1a,n2a,Ka,vec1a,P1a,P2a){
LLa = numeric(2*Ka)
for (i in 1:n1a){
for (j in 1:n2a){
LLa = LLa - vec1a%*%matrix(abs(P1a[i,]-P2a[j,]),
nrow=length(vec1a), ncol=...
2013 Dec 16
0
vectorizaciones
Hola,
De esta manera sí funciona:
#-----------------------------------------------
#...................
vec1a <- as.vector(1:3)
n1a <- 3
n2a <- 3
#P1a <- matrix(rnorm(30),nrow=3)
#P2a <- matrix(rnorm(30),nrow=3)
Ka <- 10
n.val <- 30
# En forma de funcion
producto <- function(n1a,n2a,Ka,vec1a,n.val){
# A eliminar una vez compruebes que la vectorización funciona
set.seed(123)
P1a <- matrix(rnorm(n.val),nrow=3)
P1a <- matr...
2013 Apr 19
3
extracting the diagonal of an inverse matrix
Dear R-users,
I would like to know whether there is a way to extract a diagonal of an inverse matrix without computing the inverse of the matrix itself. The size of my matrices are really huge and, also using sparse matrix, computing the inverse leads to storage problems and low speed.
In other words, given a square matrix A, I aim to know diag(B), where B=solve(A), without computing solve(A).
2010 Sep 15
1
retrieving object names passed indirectly to a function
Hi folks,
I'm stuck with a problem that I suspect has a trivial solution...
I have a function, call it foo, that takes a number of arguments which
it uses as parameters for a simulation. For later analysis, foo stores
the names of the objects passed to it along with the simulation
results in its output (written to a database). The objects names are
accessed with deparse(substitute(argname)).
2002 Oct 25
4
Samba 2.2.6 leaks file descriptions!
.../
lr-x------ 1 root root 64 Oct 25 11:39 104 -> /var/HW/DocTemp/
lr-x------ 1 root root 64 Oct 25 11:39 105 -> /var/HW/Lumentis_A1.2/TP-DBGE-0029/R1A/PRI/
lr-x------ 1 root root 64 Oct 25 11:39 106 -> /var/HW/Lumentis_A2.0/TP-MR2500-L-0041/P1A/Schema/
lr-x------ 1 root root 64 Oct 25 11:39 107 -> /var/HW/Lumentis_A2.0/TP-MR2500-L-0041/P1A/Schema/
lr-x------ 1 root root 64 Oct 25 11:39 108 -> /var/HW/Lumentis_A2.0/TP-MR2500-L-0041/P1A/
lr-x------ 1 root root 64 Oct 25 11:39 109 ->...