I am new in Scilab, I am planning to use it to do the linear programming. I googled and found this code:
Aeq = [
2 0 6
0 3 5
];
beq = [8;15;30];
c = [30;50];
[xopt]=karmarkar(Aeq,beq,c);
But it seems there is a problem with the karmarkar. Can anyone tell me how to fix my problem? I tried to use help karmarkar because I think it might be the same with Matlab but it didn't work.
The parameters
Aeqandbeqrepresent linear equality constraints. Each row ofAeqhas the coefficients of an equation, and the corresponding row ofbeqis the right hand side. Therefore, the number of rows inAeqandbeqmust be the same.Also, the number of rows of
cmust be equal to the number of variables you have, in this case three.To summarize: when you have m constraints and n variables, the matrices have the following sizes:
Aeqis m by nbeqis m by 1cis n by 1Working example: