trace(K) is just sum(diag(K)). Assuming by `.' you mean multiplication (I'll use `*' below),
trace(x*A + y*B) = x*trace(A) + y*trace(B) Let a = trace(A) = sum(diag(A)) and b = trace(B) = sum(diag(B)). You are then looking for (x, y) that satisfy a*x + b*y < C which ought to be trivial. I don't think you need R for that. Andy > From: Ramzi TEMANNI > > Hi > > I'm getting started with R and i have difficulties finding > how to solve this > problem in R : > > > > Find x,y satisfying > > Trace(K) < C, > > K positive where ( K=x.A+y.B), > > [A,B,K square Matrix in R(n x n), x,y in R] > > > > Thanks in advance, > > Ramzi > > > [[alternative HTML version deleted]] > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
