home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.disi.unige.it
/
2015-02-11.ftp.disi.unige.it.tar
/
ftp.disi.unige.it
/
pub
/
.person
/
BarlaA
/
sw
/
matlab
/
Cromwell
/
pad.m
< prev
next >
Wrap
Text File
|
2007-12-04
|
458b
|
13 lines
function w = pad(spectrum, L)
%
% W = pad(spectrum, L)
%
% Pad an input vector representing a spectrum to get its length to equal
% the next larger multiple of 2^L by reflecting the end of the spectrum.
% Copyright (c) 2003, 2004 UT M.D. Anderson Cancer Center. All rights reserved.
% See the accompanying file "license.txt" for details.
needs = ceil(length(spectrum)/2.^L)*2.^L - length(spectrum);
w = [spectrum spectrum(end:-1:end-needs+1)];