I need to implement MATLAB built-in function accumarray(), which is not supported by the Advanpix toolbox (yet?). In order to use the same code for single/double/mp precision, I tried to overload accumarray by creating a new function in the mp class. Whenever I want to pass a vector of mp values to that function, it gets "messed up".
I have put this piece of code into the methods section of mp class:
function result = accumarray(subs, val, sz)
>> accumarray([1; 2; 2; 1; 1], mp([1;2;3;4;5]))
Index exceeds matrix dimensions.
Error in mp/accumarray (line 5038)
As you can see, the second argument has still its size (and numel) but all the content was somehow shrinked into the first element. Could you, please, help me with implementing of my own methods into the toolbox?
Customer support service by UserEcho