This repository was archived by the owner on Apr 5, 2019. It is now read-only.
This repository was archived by the owner on Apr 5, 2019. It is now read-only.
legtools.remove does not check index values #8
Closed
Description
legtools.remove
's input validation does not check the values of the removal indices to see if they are valid indices. In the case of multiple deletion indices this error is handled by MATLAB, which throws an error when attempting to delete
something out of range. However, in the case of one removal index, remove
is short-circuited to remove the legend entirely if there is also only one legend entry.
For example:
figure
ezplot sin
legend sin
legtools.remove(legend,2)
See also: #7