Home > marsbar > @mardo_5 > private > pr_spm_en.m

pr_spm_en

PURPOSE ^

Euclidean normalization

SYNOPSIS ^

function [X] = pr_spm_en(X)

DESCRIPTION ^

 Euclidean normalization
 FORMAT [X] = pr_spm_en(X);
 X   - matrix
_______________________________________________________________________

 spm_en performs a Euclidean normalization setting column-wise sum of
 squares to unity
_______________________________________________________________________
 Copyright (C) 2005 Wellcome Department of Imaging Neuroscience

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [X] = pr_spm_en(X)
0002 % Euclidean normalization
0003 % FORMAT [X] = pr_spm_en(X);
0004 % X   - matrix
0005 %_______________________________________________________________________
0006 %
0007 % spm_en performs a Euclidean normalization setting column-wise sum of
0008 % squares to unity
0009 %_______________________________________________________________________
0010 % Copyright (C) 2005 Wellcome Department of Imaging Neuroscience
0011 
0012 % Karl Friston
0013 % $Id: spm_en.m 112 2005-05-04 18:20:52Z john $
0014 
0015 
0016 for i = 1:size(X,2)
0017     X(:,i) = X(:,i)/sqrt(sum(X(:,i).^2));
0018 end

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019