ind2sub(dims,[]) doesn't work properly
Reported by Vincent Azzopardi
BUG DESCRIPTION:
----------------
ind2sub(dims,[]) should return [], but it doesn't.
ERROR LOG:
----------
No error log.
HOW TO REPRODUCE THE BUG:
-------------------------
-->ind2sub([4,2],[])
ans =
4. 0.
OTHER INFORMATION:
------------------
sub2ind function works well.
For example,
-->sub2ind([4,2],[])
ans =
[]
ind2sub should be consistent with sub2ind and return [] when the entrie is [].