The find function in MATLAB returns indices where the given logical argument evaluates true.
Thus I'm wondering, why are the returned indices of type double and not uint32 or uint64 like the biggest index into a matrix could be?
Another strange thing which might be connected to that here is, that running
[~,max_num_of_elem] = computer
returns the maximal number of elements allowed for a matrix in the variable max_num_of_elem which is also of type double.
I can only guess, but probably because a wide range of functions only support double. Run
setdiff(methods('double'), methods('uint32'))
to see what functions are defined for double and not for uint32 on your version of MATLAB.
Also there is the overflow issue with integer data types in MATLAB that can introduce some hard to detect bugs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With