MATLAB Answers

0

splitting data w.r.t. sampling interval

Asked by sermet on 18 Oct 2016
Latest activity Answered by KSSV
on 18 Oct 2016
Accepted Answer by KSSV
x=1:1:20;
I need to split x array w.r.t 5 sampling interval as follows;
x_5_1=[1 2 3 4 5];
x_5_2=[6 7 8 9 10];
x_5_3=[11 12 13 14 15];
x_5_4=[16 17 18 19 20];
How can I define these sub arrays w.r.t. sampling interval with codes?

  0 Comments

Sign in to comment.

1 Answer

Answer by KSSV
on 18 Oct 2016
 Accepted Answer

x = 1:20 ;
x = reshape(x,5,[])' ;

  0 Comments

Sign in to comment.