Hi developers/or mathematicians,
First of all thanks for your numerical tours! They are very helpful.
I notice that on http://www.numerical-tours.com/matlab/optimaltransp_2_benamou_brenier/, when you define
PolyCoef = @(m0,f0,lambda)[ones(length(f0),1), 4lambda-f0, 4lambda^2-4f0, -lambdasum(m0.^2,2) - 4lambda^2f0];
The coefficient for the f term is inconsistent with the formula.

For the f term in this polynomial, in the formula it writes “4lambda^2-4lambdaf0” while in this line it’s written as “4lambda^2-4*f0”. Since later in the optimization procedure lambda is set to 1 so the results should make no difference, but I just want to give attention to this just in case someone might be using it with different parameters.
Thanks,
Hongyi
Hi developers/or mathematicians,
First of all thanks for your numerical tours! They are very helpful.
I notice that on http://www.numerical-tours.com/matlab/optimaltransp_2_benamou_brenier/, when you define
PolyCoef = @(m0,f0,lambda)[ones(length(f0),1), 4lambda-f0, 4lambda^2-4f0, -lambdasum(m0.^2,2) - 4lambda^2f0];
The coefficient for the f term is inconsistent with the formula.
For the f term in this polynomial, in the formula it writes “4lambda^2-4lambdaf0” while in this line it’s written as “4lambda^2-4*f0”. Since later in the optimization procedure lambda is set to 1 so the results should make no difference, but I just want to give attention to this just in case someone might be using it with different parameters.
Thanks,
Hongyi