summaryrefslogtreecommitdiffstats
path: root/SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m
diff options
context:
space:
mode:
Diffstat (limited to 'SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m')
-rwxr-xr-xSD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m25
1 files changed, 0 insertions, 25 deletions
diff --git a/SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m b/SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m
deleted file mode 100755
index 9844ee8..0000000
--- a/SD-VBS/benchmarks/texture_synthesis/src/matlab/mkImpulse.m
+++ /dev/null
@@ -1,25 +0,0 @@
1% IM = mkImpulse(SIZE, ORIGIN, AMPLITUDE)
2%
3% Compute a matrix of dimension SIZE (a [Y X] 2-vector, or a scalar)
4% containing a single non-zero entry, at position ORIGIN (defaults to
5% ceil(size/2)), of value AMPLITUDE (defaults to 1).
6
7% Eero Simoncelli, 6/96.
8
9function [res] = mkImpulse(sz, origin, amplitude)
10
11sz = sz(:)';
12if (size(sz,2) == 1)
13 sz = [sz sz];
14end
15
16if (exist('origin') ~= 1)
17 origin = ceil(sz/2);
18end
19
20if (exist('amplitude') ~= 1)
21 amplitude = 1;
22end
23
24res = zeros(sz);
25res(origin(1),origin(2)) = amplitude;