MATLAB: How to normalize the data set of 3 groups and 50 images (3X50) and for each image9 features have been calculated

features

Here is the part view of the data

Best Answer

Hi Bajdar,
Based on your comment the following code should work:
feature_vel = cell(3, 50);
feature_vel = cellfun(@(x) rand(1,9).*2, feature_vel, 'UniformOutput', false);
max_per_entry = cellfun(@max, feature_vel);
max_of_all_entries = max(max(max_per_entry));
feature_vel_normalized = cellfun(@(x) x./max_of_all_entries, feature_vel, 'UniformOutput', false);
The utilized function cellfun applies a function to each element of a cell array. First it is used to compute the maximum value of the 9 features of each element. The max(max()) call then finds the maximum value across all elements. Finally, cellfun is used again to divide the arrays at each element of the cell vector by the found maximum value, by utilizing an anonymous function.