comparison toolboxes/bioakustik_tools/strings/explode.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 = explode(divider,input)
2 %out = explode(divider,input)
3 out = {};
4 len = length(input);
5 start = 1;
6 stop = 1;
7
8 segment = 1;
9 while (stop <= len)
10 while (stop <= len)&& (~strcmp(input(stop),divider))
11 stop = stop+1;
12 end
13 out{segment} = input(start:stop-1);
14 segment = segment+1;
15 stop= stop+1;
16 start = stop;
17 end
18
19
20