This function performs majority voting for an input , ie. Counts the elements of a 1D array and outputs the value with the most occurrences. The input can be an array , ‘char’ or ‘cell’. Just a note if your input is an array the function will work with non-integer values. See demo for more examples. #Function [ out ] = majorityvote(in )

#Input in:1D array, cell or char #Output out:elements of a 1D array and outputs the value with the most occurrences