IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
cell2classlabels.m
Go to the documentation of this file.
1 %> @ingroup conversion classlabelsgroup
2 %> @file
3 %> @brief Inverse of @c classlabels2cell (limited)
4 %>
5 %> This function takes a cell generated by @ref classlabels2cell.m and converts it into a list of class labels (cell array).
6 %>
7 %> What it does is to return the unique elements of the third column of the argument, respecting their order of appearance.
8 %>
9 %> Please note that this function generates a set of class labels that matches the fourth column of the output of
10 %> @ref classlabels2cell.m
11 %>
12 %> @sa classlabels2cell.m
13 %
14 %> @param cc
15 %> @return \em classlabels
16 function out = cell2classlabels(cc)
17 
18 out = {};
19 
20 for i = 1:size(cc, 1)
21  if ~any(find(strcmp(out, cc{i, 3})))
22  out = [out, {cc{i, 3}}];
23  end;
24 end;
25 
function cell2classlabels(in cc)
function classlabels2cell(in classlabels, in new_hierarchy)