Normalizator v1.0
function matrix=Normalizator(TABLE,Index_1,Index_2,X_norm)
% By tonin bechon
% 09/03/2020 - v1.0 - This code may be used / shared and modified as wished
% - No licence is required.
%
% This function purpose is to normalize a TABLE or a subtable (Defined by
% the Index_1 and Index_2 columns) to a values X_norm. For normalizing a full table, set Index_1 as 1 and Index_2 as end or as size(TABLE, 2)
% EXAMPLE :
% I want to normalize the values to 100 of some columns of my table (lets
% say columns 11 to 20). I should write one of these two lines :
% TABLE(:,11:20)=Normalizator(TABLE,11,20,100)
% to replace the previous values OR :
% NewTABLE=Normalizator(TABLE,11,20,100)
% to export the normalized values in a new table.
% CODE :
%get headers
header=TABLE.Properties.VariableNames(Index_1:Index_2);
%get numbers
matrix=table2array(TABLE(:,Index_1:Index_2));
%Normalize
matrix=X_norm.*matrix./sum(matrix,2);
%Create output table with headers
matrix=array2table(matrix,'VariableNames',header);
end
Cite As
Bech Tnn (2026). Normalizator v1.0 (https://www.mathworks.com/matlabcentral/fileexchange/74466-normalizator-v1-0), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
