v2007.09.13 - Convex Optimization
v2007.09.13 - Convex Optimization v2007.09.13 - Convex Optimization
646 APPENDIX F. MATLAB PROGRAMSif nargin < 2 | isempty(tolerance_in)tolerance_in = eps;endtolerance = max(tolerance_in, eps*N*norm(D));if nargin < 3 | isempty(verbose)verbose = ’on’;endif nargin < 5 | isempty(V)use = ’Vn’;elseuse = ’V’;end% is emptyif N < 1if strcmp(verbose,’on’), disp(’Input D is empty.’), endX = [ ];Dclosest = [ ];isisnot = ’isnot’;r = [ ];returnend% is squareif size(D,1) ~= size(D,2)if strcmp(verbose,’on’), disp(’An EDM must be square.’), endX = [ ];Dclosest = [ ];isisnot = ’isnot’;r = [ ];returnend% is realif ~isreal(D)if strcmp(verbose,’on’), disp(’Because an EDM is real,’), endisisnot = ’isnot’;D = real(D);end
F.1. ISEDM() 647% is nonnegativeif sum(sum(chop(D,tolerance) < 0))isisnot = ’isnot’;if strcmp(verbose,’on’), disp(’Because an EDM is nonnegative,’),endend% is symmetricif sum(sum(abs(chop((D - D’)/2,tolerance)) > 0))isisnot = ’isnot’;if strcmp(verbose,’on’), disp(’Because an EDM is symmetric,’), endD = (D + D’)/2; % only required conditionend% has zero diagonalif sum(abs(diag(chop(D,tolerance))) > 0)isisnot = ’isnot’;if strcmp(verbose,’on’)disp(’Because an EDM has zero main diagonal,’)endend% is EDMif strcmp(use,’Vn’)VDV = -Vn(N)’*D*Vn(N);elseVDV = -Vm(N)’*D*Vm(N);end[Evecs Evals] = signeig(VDV);if ~isempty(find(chop(diag(Evals),...max(tolerance_in,eps*N*normest(VDV))) < 0))isisnot = ’isnot’;if strcmp(verbose,’on’), disp(’Because -VDV < 0,’), endendif strcmp(verbose,’on’)if strcmp(isisnot,’isnot’)disp(’matrix input is not EDM.’)elseif tolerance_in == epsdisp(’Matrix input is EDM to machine precision.’)elsedisp(’Matrix input is EDM to specified tolerance.’)end
- Page 596 and 597: 596 APPENDIX E. PROJECTIONa ∗ 2K
- Page 598 and 599: 598 APPENDIX E. PROJECTIONwhere Y =
- Page 600 and 601: 600 APPENDIX E. PROJECTION(B.4.2).
- Page 602 and 603: 602 APPENDIX E. PROJECTIONis a nono
- Page 604 and 605: 604 APPENDIX E. PROJECTIONE.6.4.1Or
- Page 606 and 607: 606 APPENDIX E. PROJECTIONq i q T i
- Page 608 and 609: 608 APPENDIX E. PROJECTIONThe test
- Page 610 and 611: 610 APPENDIX E. PROJECTIONPerpendic
- Page 612 and 613: 612 APPENDIX E. PROJECTIONE.8 Range
- Page 614 and 615: 614 APPENDIX E. PROJECTIONAs for su
- Page 616 and 617: 616 APPENDIX E. PROJECTIONWith refe
- Page 618 and 619: 618 APPENDIX E. PROJECTIONProjectio
- Page 620 and 621: 620 APPENDIX E. PROJECTIONE.9.2.2.2
- Page 622 and 623: 622 APPENDIX E. PROJECTIONThe foreg
- Page 624 and 625: 624 APPENDIX E. PROJECTION❇❇❇
- Page 626 and 627: 626 APPENDIX E. PROJECTIONE.10 Alte
- Page 628 and 629: 628 APPENDIX E. PROJECTIONbH 1H 2P
- Page 630 and 631: 630 APPENDIX E. PROJECTIONa(a){y |
- Page 632 and 633: 632 APPENDIX E. PROJECTION(a feasib
- Page 634 and 635: 634 APPENDIX E. PROJECTIONwhile, th
- Page 636 and 637: 636 APPENDIX E. PROJECTIONE.10.2.1.
- Page 638 and 639: 638 APPENDIX E. PROJECTION10 0dist(
- Page 640 and 641: 640 APPENDIX E. PROJECTIONE.10.3.1D
- Page 642 and 643: 642 APPENDIX E. PROJECTIONE 3K ⊥
- Page 644 and 645: 644 APPENDIX E. PROJECTION
- Page 648 and 649: 648 APPENDIX F. MATLAB PROGRAMSend%
- Page 650 and 651: 650 APPENDIX F. MATLAB PROGRAMSF.1.
- Page 652 and 653: 652 APPENDIX F. MATLAB PROGRAMScoun
- Page 654 and 655: 654 APPENDIX F. MATLAB PROGRAMSF.3
- Page 656 and 657: 656 APPENDIX F. MATLAB PROGRAMSF.3.
- Page 658 and 659: 658 APPENDIX F. MATLAB PROGRAMS% so
- Page 660 and 661: 660 APPENDIX F. MATLAB PROGRAMS% tr
- Page 662 and 663: 662 APPENDIX F. MATLAB PROGRAMSF.4.
- Page 664 and 665: 664 APPENDIX F. MATLAB PROGRAMSbrea
- Page 666 and 667: 666 APPENDIX F. MATLAB PROGRAMSwhil
- Page 668 and 669: 668 APPENDIX F. MATLAB PROGRAMSF.7
- Page 670 and 671: 670 APPENDIX F. MATLAB PROGRAMS
- Page 672 and 673: 672 APPENDIX G. NOTATION AND A FEW
- Page 674 and 675: 674 APPENDIX G. NOTATION AND A FEW
- Page 676 and 677: 676 APPENDIX G. NOTATION AND A FEW
- Page 678 and 679: 678 APPENDIX G. NOTATION AND A FEW
- Page 680 and 681: 680 APPENDIX G. NOTATION AND A FEW
- Page 682 and 683: 682 APPENDIX G. NOTATION AND A FEW
- Page 684 and 685: 684 APPENDIX G. NOTATION AND A FEW
- Page 686 and 687: 686 APPENDIX G. NOTATION AND A FEW
- Page 688 and 689: 688 BIBLIOGRAPHY[7] Abdo Y. Alfakih
- Page 690 and 691: 690 BIBLIOGRAPHY[27] Aharon Ben-Tal
- Page 692 and 693: 692 BIBLIOGRAPHY[48] Lev M. Brègma
- Page 694 and 695: 694 BIBLIOGRAPHY[67] Joel Dawson, S
646 APPENDIX F. MATLAB PROGRAMSif nargin < 2 | isempty(tolerance_in)tolerance_in = eps;endtolerance = max(tolerance_in, eps*N*norm(D));if nargin < 3 | isempty(verbose)verbose = ’on’;endif nargin < 5 | isempty(V)use = ’Vn’;elseuse = ’V’;end% is emptyif N < 1if strcmp(verbose,’on’), disp(’Input D is empty.’), endX = [ ];Dclosest = [ ];isisnot = ’isnot’;r = [ ];returnend% is squareif size(D,1) ~= size(D,2)if strcmp(verbose,’on’), disp(’An EDM must be square.’), endX = [ ];Dclosest = [ ];isisnot = ’isnot’;r = [ ];returnend% is realif ~isreal(D)if strcmp(verbose,’on’), disp(’Because an EDM is real,’), endisisnot = ’isnot’;D = real(D);end