File Exchange

image thumbnail

Gini coefficient and the Lorentz curve

version 1.0 (3.11 KB) by

Computes the Gini coefficient and the Lorentz curve of weighted data.

24 Downloads

Updated

View License

The Gini coefficient is a measure of the inequality of a distribution (often used for income or wealth distributions). The Lorentz curve is a graphical representation of this inequality which is intimately related to the Gini coefficient. The program is straightforward to use. Please consult the help included in the file for an extensive description of the two concepts and how to use the program.

Please also comment if you like it or find it useful.

Comments and Ratings (2)

Yvan Lengwiler

Yvan Lengwiler (view profile)

Dear Duarte, this is odd, because line 96 is "[~,ord] = sort(val);", and that is a perfectly valid statement. If you have an older version of Matlab, try replacing the tilde as follows: "[temp,ord] = sort(val);" and let me know if that helps.

Duarte Oom

The progrma gives me a error
??? Error: File: gini.m Line: 96 Column: 7
Expression or statement is incorrect--possibly
unbalanced (, {, or [.

MATLAB Release
MATLAB 7.10 (R2010a)

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

» Watch video

Win prizes and improve your MATLAB skills

Play today