[R] optim or nlm with matrices

Ahmad Abu Hammour hammour at msn.com
Fri Apr 26 20:37:03 CEST 2002

I have the following hypothetical optimization problem:
where A,x,x1 are matrices. A coefficients and x and x1 are variable matrices or vectors.
I tried to apply optim and nlm functions but I kept receive the following massage:
Error in A%*%x1 : non-conformable arguments.
The massage appears even the -det() can be calculated and the dimensions are checked.
here is my example although there might be no solution for the optimization problem.
Another question regarding optimization:
is there any chance that I can find a function or package that can do a constrained optimization such as: -det(x-A*x1-B*x2)' (x-A*x1-B*x2))  
subject to  
p-f(A,B,...)=0, where f denotes a function.
Thank you for your help in advance.
Ahmad Abu Hammour
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20020426/3776f60f/attachment.html

More information about the R-help mailing list