summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/utils/split_vect.m
blob: aef5c5c383a3bf1e7a7668ba33b05c96251f01ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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