Ask about final result in emd.m

1 次查看(过去 30 天)
Boris
Boris 2012-5-6
According to: http://www.mathworks.com/matlabcentral/fileexchange/22962-the-earth-movers-distance And thanks to Ulas Yilmaz for sahring this file. I want to ask. What is the final result of the emd.m?
Here is the code for linear programming in emd.m
% linear programming
[x, fval] = linprog(f, A, b, Aeq, beq, lb);
fval = fval / sum(x);
Is the fval(the value of the total flow) as the final result of emd.m? I mean (fval) is the value of EMD(P,Q)?
Than you for your help.
Boris.

回答(1 个)

Wayne King
Wayne King 2012-5-6
Well, I don't know this specific application but I can tell you what the outputs of linprog() mean in general.
linprog() minimizes the linear functional f'*A subject to a constraint, which is A*x <=b
The output fval is the value of the linear functional with the minimizing x: fval = f'*x (where here x is the minimizing vector)
In this case, it looks like x is the minimizing flow vector and fval is the value of the flow using that minimizing vector.

类别

Help CenterFile Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by