R/Lagrange.R

Defines functions Lagrange

Documented in Lagrange

Lagrange = function(A,C,b,d){

  stopifnot(is.numeric(A) & is.numeric(C) & is.numeric(b) & is.numeric(d))

  x_norm = solve(t(A)%*%A) %*% t(A)%*%b
  x_norm + solve(t(A)%*%A) %*% t(C) %*%
  solve( C %*% solve(t(A)%*%A) %*% t(C) ) %*% (d-C %*% x_norm)
}

Try the LSE package in your browser

Any scripts or data that you put into this service are public.

LSE documentation built on Feb. 2, 2022, 5:07 p.m.