I used this function on matlab2012a and it throw error like "Undefined function 'makeColorMap' for input arguments of type 'double'.":
My called codes are belows:
a = makeColorMap([1 0 0],[1 1 1],[0 0 1]);
Would you give some solution?
04 Jul 2014
Consolidates common elements in x (may be n-dimensional), aggregating corresponding y.
This function is exactly what I was looking for. Thanks for providing it, John!
I just discovered a minor bug:
It happened that I applied consolidate to x = 0.2 and y = [11 6.8].
[xc, yc] = consolidator(x,y, '@nanmean')
xc = 0.2
yc = 11
The last value of y is gone; the consolidator somehow "swallowed" it.
Although it does not make sense to consolidate an array that only has one row, the application of this function in this way can happen, especially when processing a lot of different arrays automatically.