Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am trying to play with some linear programming examples of Mathematica as ExampleData[{"LinearProgramming", "blend"}, "Equations"]. It gives me the MPS format of the samples. How can I change them?

share|improve this question
1  
You've seen this? –  J. M. May 6 '13 at 11:13

1 Answer 1

up vote 3 down vote accepted

One thing you can do is to import in the ConstraintMatrix form.

 Import["ExampleData/afiro.mps", "ConstraintMatrix"]

This gives a SparseArray object, which can be turned back into a regular matrix format using Normal. Some other possible manipulations of the MPS data are discussed here.

share|improve this answer
    
Could you please show me how I can use the Normal and after changing it how having new SparseArray again? –  Alex May 6 '13 at 17:52
1  
After applying Normal it is a matrix of values and you can do anything with it you desire. If you name it (say m) then you can get back to sparse form by SparseArray[m]. –  bill s May 6 '13 at 17:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.