summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/utils/split_vect.m
blob: c492581e4017a76082f857c17fc41d8417404197 (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