I haven't actually tried this yet, but how about using the 'sparse' parameter in accumarray? And why not add a 'dim' parameter to your function...I think it's still possible to do this with accumarray.
How to count elements in a row?
For Example: [0 0 0 1 1 1 1 0 0 0 1 1 0 1 ]
I need to find the position of 1's in a row and count it seperately. Can some1 suggest me solution?
I was wondering if the code could be modified to accept a 'rows' option, like the unique script? I have x,y,z data that can have more than one column identical. Thanks!
Comment only