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
/
signal2noise.m
< prev
next >
Wrap
Text File
|
2007-12-04
|
407b
|
15 lines
function sn = signal2noise(raw, base, smooth)
% Copyright (c) 2003, 2004 UT M.D. Anderson Cancer Center. All rights reserved.
% See the accompanying file "license.txt" for details.
xx=abs(raw-smooth);
[rx cx] = size(xx);
yy = repmat(0, [rx cx-500]);
for i = 1:cx-500,
yy(:, i) = mean(xx(:, i:i+500)')';
end
yy=[repmat(yy(:, 1), [1 250]) yy repmat(yy(:, end), [1 250])];
sn = base ./ yy;