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