Re: [R] To find vector X under contraints

2008-09-08 Thread Uwe Ligges
Shubha Vishwanath Karanth wrote: Hi R, I have the variance-covariance matrix, V=matrix(c(0.09238, 0.002407527, 0.002407527, 0.020739401),2,2) I need to find a vector X=c(x1,x2), such that 1) X'VX is equal to a constant 2 (say) and 2) sum(x) should be equal to a another c

[R] To find vector X under contraints

2008-09-08 Thread Shubha Vishwanath Karanth
Hi R, I have the variance-covariance matrix, >V=matrix(c(0.09238, 0.002407527, 0.002407527, 0.020739401),2,2) I need to find a vector X=c(x1,x2), such that 1) X'VX is equal to a constant 2 (say) and 2) sum(x) should be equal to a another constant 1.5 (say). How do we do this