Assigning class labels to a concatenated matrix

1 view (last 30 days)
So I have to process certain images using a function which is custom defined.
So say I have images h.jpg , e.jpg, l.jpg
I process these by a function and each images gives me an output of 10x6
I concatenate these three vertically and its forms a 30x6 matrix say Jumbo Matrix
Now need a way to remember what is the character class for each row in this matrix. Does anyone know how to do this? Is it possible to use another array with the same number of rows as Jumbo Matrix and where in each row I can keep the corresponding class label, ie 1 for ‘h’, 2 for ‘e’, 3 for ‘l’?

Answers (1)

Walter Roberson
Walter Roberson on 15 Mar 2014
Sure.
JumboClass = {'h'; 'e'; 'l'};
Then
JumboClass{3}
would be 'l'

Categories

Find more on Images in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!