comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirtemporal/plus.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 c = plus(a,b)
2
3 d = get(a,'Data');
4 e = get(b,'Data');
5 f = cell(1,length(d));
6 p = get(a,'Time');
7 q = get(b,'Time');
8 r = cell(1,length(d));
9 l = get(a,'Name');
10 m = get(b,'Name');
11 n = cell(1,length(l));
12 for i = 1:length(d)
13 f{i} = cell(1,length(d{i}));
14 for j = 1:length(d{i})
15 ld = size(d{i}{j},1);
16 le = size(e{i}{j},1);
17 if ld > le
18 r{i}{j} = p{i}{j};
19 f{i}{j} = d{i}{j} + [e{i}{j};zeros(ld-le,size(e,2),size(e,3))];
20 else
21 r{i}{j} = q{i}{j};
22 f{i}{j} = [d{i}{j};zeros(le-ld,size(d,2),size(d,3))] + e{i}{j};
23 end
24 end
25 n{i} = [l{i} '+' m{i}];
26 end
27 c = set(a,'Pos',r,'Data',f,'Name',n);