Skip to content

Commit

Permalink
fixed a bug when indexxz is empty (the quantile interpolation is done…
Browse files Browse the repository at this point in the history
… in the first interval)

below the modified code.

if DiscreteData==false & ~isempty(indexxz)

            plot([xbars;x(indexxz+2)],fcum(indexxz:indexxz+1))
        else
            indexxz=1;
            plot([0 x(indexxz+1)],[0 fcum(indexxz)])

        end
  • Loading branch information
AldoCorbelliniUNIPR committed Jan 22, 2025
1 parent 8c5582b commit f41538f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion toolbox/examples/GUIquantile.m
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,13 @@
xlabel('$x_i$','Interpreter','latex','FontSize',16)
ylabel('Cumulative distribution function $F(x_i)$','Interpreter','latex','FontSize',16)

if DiscreteData==false
if DiscreteData==false & ~isempty(indexxz)

plot([xbars;x(indexxz+2)],fcum(indexxz:indexxz+1))
else
indexxz=1;
plot([0 x(indexxz+1)],[0 fcum(indexxz)])

end
end

Expand Down

0 comments on commit f41538f

Please sign in to comment.