diff options
author | YanzhenXiangRobotics <xyz000327@gmail.com> | 2023-05-10 23:18:37 +0200 |
---|---|---|
committer | YanzhenXiangRobotics <xyz000327@gmail.com> | 2023-05-10 23:18:37 +0200 |
commit | 241e6d754e71e9784c49fc70f218269b07290b64 (patch) | |
tree | f8a2c2d5e57fbc6369d1fa9500ba81a8547d3465 /templates/chebycenter.m | |
parent | Update progress.md (diff) | |
download | mpc_pe-241e6d754e71e9784c49fc70f218269b07290b64.tar.gz mpc_pe-241e6d754e71e9784c49fc70f218269b07290b64.zip |
Revert mistakenly pushed to master
This reverts commit c5cdd03fc0588f7d34d8b97713caa6d19e5becea.
Diffstat (limited to '')
-rwxr-xr-x | templates/chebycenter.m | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/templates/chebycenter.m b/templates/chebycenter.m deleted file mode 100755 index cbdce1c..0000000 --- a/templates/chebycenter.m +++ /dev/null @@ -1,20 +0,0 @@ -function [c,r] = chebycenter(A,b) -%CHEBYCENTER Compute Chebyshev center of polytope Ax <= b. -% The Chebyshev center of a polytope is the center of the largest -% hypersphere enclosed by the polytope. -% Requires optimization toolbox. - -[n,p] = size(A); -an = sqrt(sum(A.^2,2)); -A1 = zeros(n,p+1); -A1(:,1:p) = A; -A1(:,p+1) = an; -f = zeros(p+1,1); -f(p+1) = -1; - -options = optimset; -options = optimset(options,'Display', 'off'); -c = linprog(f,A1,b,[],[],[],[],[],options); -r = c(p+1); -c = c(1:p); -end |