Mercurial > hg > camir-aes2014
comparison core/tools/implode.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 = implode(divider, input); | |
2 % out = implode(divider, input) | |
3 | |
4 out = []; | |
5 for i = 1:numel(input) | |
6 | |
7 % only put divider inbetween data | |
8 if i > 1 | |
9 | |
10 out = sprintf('%s%s%d', out, divider, input(i)); | |
11 else | |
12 | |
13 out = sprintf('%d', input(i)); | |
14 end | |
15 end |