view util/ksvd utils/normcols.m @ 212:1d134a1b6f95 luisf_dev

Propagate the change from 'mailhe' to 'opt' in two_step_DL to the examples
author bmailhe
date Wed, 21 Mar 2012 18:13:02 +0000
parents c3eca463202d
children
line wrap: on
line source
function y = normcols(x)
%NORMCOLS Normalize matrix columns.
%  Y = NORMCOLS(X) normalizes the columns of X to unit length, returning
%  the result as Y.
%
%  See also ADDTOCOLS.


%  Ron Rubinstein
%  Computer Science Department
%  Technion, Haifa 32000 Israel
%  ronrubin@cs
%
%  April 2009


y = x*spdiag(1./sqrt(sum(x.*x)));