z-score rescaling

Rescale the input data by z-score.
88 Downloads
Updated 3 Oct 2016

View License

% z-score rescaling.
% Input:
% 'data' : input data matrix (nSample X nFeatures, if dim = 1) or (nFeatures X nSamples, if dim = 2)
% Optional inputs:
% 'flag' : 0 {default} using sample std (N-1)
% 1 using population std (N)
% 'mean_array', 'sd_array' : (1 X nFeatures) optional inputs of mean and sd
% for the calculation of z-score. If not provided, mean and sd will be
% calculated based on the input 'data'.
% 'dim' : {defalt = 1} dimention along which the averaging and calculation
% of sd is performed for z-scoring.
% Output:
% 'zcoredData' : (nSample X nFeatures) output data after z-score rescaling.
% 'mean_array', 'sd_array' : (1 X nFeatures, if dim = 1) or (nFeatures X 1, if dim = 2) arrays for mean and sd
% WR Chen 03/16

Cite As

Wei-Rong Chen (2024). z-score rescaling (https://www.mathworks.com/matlabcentral/fileexchange/59406-z-score-rescaling), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Data Acquisition Toolbox Supported Hardware in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0