I am new to Matlab and just started getting into generating histograms. I understand how to create a histogram that determines the frequency of values..
But how can I create a histogram that is looking for specific combinations of data?
For example I have the following data set:
someData = [1,3,4,4,2,1,1,0]
How would I be able to create a histogram that determines the frequency of one value in the data set is exactly equal to the next value within the same dataset??
In the above example the answer should be 2. (4 repeat and are adjacent to each other. 1 repeats and is adjacent to each other)
Help is MOST appreciated!
No products are associated with this question.
You can do this with the gray level co-occurrence matrix (GLCM). It's done by the function graycomatrix() in the Image Processing Toolbox. It's like a 2D histogram that counts how many times each gray level (numerical value) occurs next to every other gray level (value).
Play games and win prizes!Learn more