• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Matlab: Solving Linear Systems of Equations?

brianafischer

Senior member
I have been working on linear systems equations for about a week now. It seems that Excel's built-in solver is not powerful enough to handle some problems (i.e. the classic Archimedes Cattle problem). Therefore, I have started looking into Matlab as I know how powerful it is. My issue is that I need to be able to solve systems of linear equations with integer constraints (i.e. x=1,2,3,.... and x>0). I am not familiar with programming in Matlab and was wondering how I could do this... Any advice would be appreciated. I have included an example below:

[x1 x2 x3 x4 x5 x6 RHS ]
[0.01 0.05 0.1 0.25 0.5 1 50.93 ]
[1 1 1 1 1 1 249 ]
[2.5 5 2.268 5.67 11.34 8.1 1331.942]
[1.55 1.95 1.35 1.75 2.15 2 438.85 ]

Solving through matricies in Matlab gives me:
x =
151.6188
15.8561
0
0
65.8083
15.7169

However, the key issue here is that I need to make sure that the answers are in integer form!


Thanks,
Brian
 
Back
Top