[R] Solution of function

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Wed May 7 16:06:46 CEST 2008


Megh Dal wrote:
> Hi,
>    
>   I want to find solution of function :  f(x,y) = x'Cx - a under constraints :
>    
>   0 < x,y < p
>   0 < x-y< q
>    
>   where a, p,q are given constants and x = (x, y) and C is a 2X2 matrix (given)
>    
>   Can anyone suggest me any R function to do that?
>    
>   
Not likely. What you have (if C is  positive definite) is the
intersection between the boundary of an ellipse and the interior of a
parallelepiped, where the center of the ellipse and one corner of the
parallelepiped is at (0,0).

This is the union of between zero and three curve segments (hmm, maybe
only two) and I don't think any of the standard solvers and minimizers
can come up with that kind of result.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



More information about the R-help mailing list