matrix equalities in linprog

I'm trying to set up four equalities with linprog. The following is an example of the equations I'm trying to setup:
[(C1-I)*M]-[(n-1)*E]-O=0
[(C2-I)*L]-[(n-1)*D]-P=0
Where C1 and C2 are n by n matrices, I is a unit matrix of n by n, and D,E,L,M,O,P are (1 by n)' matrices. C1 and C2 are constants.
I tried the following for the first equality:
Aeq(1,[(C1-I)*M,(n-1)*E,O])=[1 1 1 1,-1 -1 -1 -1,1 1 1 1];
The problem I'm running into is that I get the following error "subscript indices must either be real positive integers or logicals." C1 and C2 have values with decimals so I believe that is the cause of the problem, but is there way aroud the error. Also I'm not sure if my setup for Aeq is correct.

답변 (0개)

카테고리

질문:

JR
2011년 9월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by