From: matt Date: Sat, 2 Jun 2007 16:13:08 +0000 (+0000) Subject: useful for splitting up packets X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=d476abb6debdf8ef5c0adf97af50a9b704605e2a;p=debian%2Fgnuradio useful for splitting up packets git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5605 221aa14e-8319-0410-a670-987f0aec2ac5 --- diff --git a/gnuradio-core/src/utils/split_vect.m b/gnuradio-core/src/utils/split_vect.m new file mode 100644 index 00000000..c492581e --- /dev/null +++ b/gnuradio-core/src/utils/split_vect.m @@ -0,0 +1,15 @@ +% split vector into packets + +function y = split_vect(vect,N) + Z = floor(max(size(vect))/N); + y = []; + if(size(vect)(1)>size(vect)(2)) + v = vect'; + else + v = vect; + end + for i=1:Z + y(i,1:N) = v((i-1)*N+1:i*N); + end +end +