% Use YALMIP to generate SeDuMi data
A = sprandn(60,60,.01);
P = sdpvar(60);
Con = [A'*P+P*A <= -eye(60)];
obj = trace(P);
model = export(Con,obj,sdpsettings('solver','sedumi'));
At = model.A;b = model.b;c = model.C;K = model.K;
% Save SeDuMi data to file
% SDPA does not support free variables and SOCPs, and OPTI will scream even
% though the fields are empty
% NOTE: If these aren't empty, you cannot remove them!!!
K = rmfield(K,'f')
K = rmfield(K,'q')
K = rmfield(K,'r')
K = rmfield(K,'scomplex')
K = rmfield(K,'xcomplex')
save testfile At b c K
% Load to opti
[prob,p] = sdpRead('testfile.mat');
% Save to SDPA
sdpWrite(prob,'testsdpa.dat-s','sdpa-s')