Home > NoiseTools > nt_normpagecol.m

# nt_normpagecol

## PURPOSE

y=nt_normpagecol(x,w) - normalize each column of each page so its weighted msq is 1

## SYNOPSIS

function y=nt_normpagecol(x,w)

## DESCRIPTION

     y=nt_normpagecol(x,w) - normalize each column of each page so its weighted msq is 1

       y: normalized data

       x: data to normalize
       w: weight

     Weight should be either a column vector, or a matrix (2D or 3D) of same
     size as data.

## CROSS-REFERENCE INFORMATION

This function calls:

- nt_normcol [y,norm]=nt_normcol(x,w) - normalize each column so its weighted msq is 1

This function is called by:

## SOURCE CODE

    0001 function y=nt_normpagecol(x,w)
    0002 % y=nt_normpagecol(x,w) - normalize each column of each page so its weighted msq is 1
    0003 %
    0004 %   y: normalized data
    0005 %
    0006 %   x: data to normalize
    0007 %   w: weight
    0008 %
    0009 % Weight should be either a column vector, or a matrix (2D or 3D) of same
    0010 % size as data.
    0011
    0012 if nargin<2; w=[]; end
    0013
    0014 [m,n,o]=size(x);
    0015 if isempty(w)
    0016     y=nt_normcol(reshape(x,[m,n*o]));
    0017     y=reshape(y,[m,n,o]);
    0018 else
    0019     error('not implemented for weights');
    0020 end
    0021
    0022