Mercurial > hg > camir-ismir2012
comparison toolboxes/bioakustik_tools/strings/explode.m @ 0:cc4b1211e677 tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
author | Daniel Wolff |
---|---|
date | Fri, 19 Aug 2016 13:07:06 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cc4b1211e677 |
---|---|
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 |