File Exchange

image thumbnail

Projection onto simplex

version 1.2 (1.69 KB) by

This program computes the projection onto the canonical simplex

16 Downloads

Updated

View License

This program computes the projection of any n-dimensional vector y onto the canonical simplex Dn defined by Dn:={x: x n-dimensional vector, 0<=x<=1, sum(x(:))=1 }. Namely, it solves x=arg min_x |x-y| subject to the constraint that x is in Dn.

Syntax:
x = projsplx(y);

Explanation of the algorithm can be found at
http://arxiv.org/abs/1101.6081
or
http://ufdc.ufl.edu/IR00000353/

C code and pre-compiled mex files can be found at the author's website.

Comments and Ratings (1)

Wok

Wok (view profile)

Updates

1.2

update description. improve the code efficiency

MATLAB Release
MATLAB 7.6 (R2008a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video