Hi sir,
we currently use this metric to measure our image fusion quality.
We find out some abnormal computation in this code.
As the title, we see that the computation of "fSub" variable in "fmi.m" code is modified as in figure below.

Then this variable is continuously reused again as in figure below.

From our point of view, "fSub" in these two cases should be independent,
since it causes a slightly different in our results, so we believe this is a bug in the code.
Therefore, we would like to inform about it and hope it is helpful to you.
BR,
larycoder.