Home > sgwt_toolbox > sgwt_delta.m

sgwt_delta

PURPOSE ^

sgwt_delta : Return vector with one nonzero entry equal to 1.

SYNOPSIS ^

function r=sgwt_delta(N,j)

DESCRIPTION ^

 sgwt_delta : Return vector with one nonzero entry equal to 1.

 function r=sgwt_delta(N,j)

 Returns length N vector with r(j)=1, all others zero

 Inputs :
 N - length of vector
 j - position of "delta" impulse

 Outputs:
 r - returned vector

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % sgwt_delta : Return vector with one nonzero entry equal to 1.
0002 %
0003 % function r=sgwt_delta(N,j)
0004 %
0005 % Returns length N vector with r(j)=1, all others zero
0006 %
0007 % Inputs :
0008 % N - length of vector
0009 % j - position of "delta" impulse
0010 %
0011 % Outputs:
0012 % r - returned vector
0013 
0014 % This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform toolbox)
0015 % Copyright (C) 2010, David K. Hammond.
0016 %
0017 % The SGWT toolbox is free software: you can redistribute it and/or modify
0018 % it under the terms of the GNU General Public License as published by
0019 % the Free Software Foundation, either version 3 of the License, or
0020 % (at your option) any later version.
0021 %
0022 % The SGWT toolbox is distributed in the hope that it will be useful,
0023 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0024 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0025 % GNU General Public License for more details.
0026 %
0027 % You should have received a copy of the GNU General Public License
0028 % along with the SGWT toolbox.  If not, see <http://www.gnu.org/licenses/>.
0029 
0030 function r=sgwt_delta(N,j)
0031   r=zeros(N,1);
0032   r(j)=1;
0033

Generated on Tue 04-May-2010 16:00:20 by m2html © 2003