sdpRead
Read a SDPA Dense or Sparse file, or SeDuMi MAT file into Matlab
Syntax
prob = sdpRead(filename)
prob = sdpRead(filename,filetype)
prob = sdpRead(filename,filetype,print)
Description
Read a SDP into Matlab.
prob = sdpRead(filename) reads the file specified by filename and creates an optiprob problem. If you supply only a filename the file must be on Matlab's path in order for this function to find it. Otherwise if you supply a full path + filename, it may reside anywhere on your PC. You must supply the file extension using this method.
prob = sdpRead(filename,filetype) allows the user to enter just the filename (without an extension), and manually specify the file type (e.g. 'SDPA').
prob = sdpRead(filename,filetype,print) will also print headings found plus any errors encountered during reading with print = 1. Note not all file types support text output, in which case it will be ignored.
Available File Types
| File Type | Extension | Notes |
| 'SDPA-S' | .dat-s | Sparse Format |
| 'SDPA' | .dat | Dense Format |
| 'SeDuMi' | .mat |
Examples
A number of small examples are supplied with the toolbox in the folder OPTI/Test Problems/ which can be used for testing.
Reading a SDPA file
If a file extension is supplied, this dictates the file type.
>> prob = sdpRead('arch0.dat-s')
Reading a SeDuMi file
You may also supply the file type manually.
>> prob = sdpRead('sdp_truss1','sedumi')
Copyright © 2011-2013 Jonathan Currie (I2C2)