search for: tp4649764p4649775

Displaying 1 result from an estimated 1 matches for "tp4649764p4649775".

Did you mean: tp4649764p4649774
2012 Nov 16
4
Multiple Vector with matrix in R
Hi Can someone show me an easy way to multiple a weighted vector with an matrix? example below mat1<-matrix(sample(1:100,80,replace=TRUE),ncol=8) w <- 1/1:10 I want the first element in w to be multiplied by the first row of mat1 and 2nd element in w to be multiplied with the 2nd row and so on. I have huge matrix is there an easy way other than diag(w)%*%mat1 Thanks -- View this