xAx: Given a numeric vector x and a numeric matrix A, calculates...

Description Usage Arguments Value Examples

View source: R/NguyenToolsnguyenPkgRfunctionsHW2.R

Description

Computes x'inv(A)x of a numeric matrix A and numeric vector x.

Usage

1
xAx(a, x)

Arguments

x

numeric vector

A

numeric matrix

Value

scalar number computed by x'inv(A)x

Examples

1
2
3
4
5
load(url("http://www.stat.umn.edu/geyer/3701/data/q2p1.rda"))
ls()
a <- as.matrix(a)
x <- as.matrix(x)
xAx(a, x)

benjnguyen/NguyenTools documentation built on May 25, 2019, 3:22 p.m.