arg max data type
5 views (last 30 days)
Take the following example
x = single(-(-2:2).^2);
I think it strange that variable ix is of type double, and not integer, which would be the most logical alternative.
Anyway, I am using this kind of line for a code generation case, where double data type is banned.
Is there any way I can force max function to return an integer value for argmax (variable ix in code above)?