Mercurial > hg > camir-aes2014
comparison core/magnatagatune/tests_evals/rbm_subspace/conv_subspace_delta.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function out = conv_subspace_delta(a, b, w, norm) | |
2 % out = conv_subspace_delta(a, b, w, norm) | |
3 % compute the distance vector from 2 vectors a,b using convolution euclidean % | |
4 % w = convolution window | |
5 % | |
6 % DW adapted from sontran2013 | |
7 | |
8 % window for convolution | |
9 | |
10 s_len = numel(a); | |
11 if w == 0 | |
12 w = s_len; | |
13 end | |
14 cv_vec = ones(w,1); | |
15 | |
16 out = sqrt(conv(cv_vec,(a - b).^2)); | |
17 % out = out(:,w:end-w); | |
18 if norm | |
19 out = out./(conv(cv_vec,ones(s_len,1))); | |
20 end | |
21 | |
22 % how to get to 1 dimension? | |
23 % out = sum(out); | |
24 | |
25 |