Description
The function x2fx.m contains a variable shadowing issue where the loop variable idx is reused in nested loops.
Affected Code Section:
for idx = 1:r % Outer loop line 184
...
for idx = 1:length(collist) % Inner loop (overwrites outer `idx`)
...
end
end
Expected Behavior
- Outer and inner loops should use different index variables.
I don't know if the same name of the inner and outer loop indexes of the programming language code will have an effect, but I recommend changing it.