wInProd | R Documentation |
Computes weighted inner products.
wInProd(A1, A2, weight = NULL)
A1 |
The input matrix 1. |
A2 |
The input matrix 2. |
weight |
The weighting vector. |
inP
The weighted inner product.
############
#Example 1 #
############
A1 = c(0,1,2,0,1,3)
A2 = c(1,2,0,0,4,1)
wInProd(A1, A2)
############
#Example 2 #
############
A1 = c(0,1,2,0,1,3)
A2 = c(1,2,0,0,4,1)
w = c(0,0,0,1,1,1)
wInProd(A1, A2, weight = w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.