Mercurial > repos > public > sbplib
comparison semiDefIneq.m @ 129:0a881a3dc9a9
Cleaned up the code for minors.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 03 Feb 2016 17:41:46 +0100 |
parents | |
children | eaf557023fbe |
comparison
equal
deleted
inserted
replaced
128:f7629720f1b7 | 129:0a881a3dc9a9 |
---|---|
1 function ineq = semiDefIneq(A) | |
2 [m, sub] = minors(A); | |
3 | |
4 ineqsys = true; | |
5 for i = 1:length(m) | |
6 ineqsys = ineqsys & m(i) >= 0; | |
7 end | |
8 | |
9 ineq = simplify(ineqsys); | |
10 | |
11 str = toString(ineq); | |
12 fprintf('%s\n',strjoin(strsplit(str,' & '), '\n')); | |
13 end |