I have this code:
len1 = a(4);st1 = 5; % starting index for first channel
y1 = a(st1: st1+len1-1);len2 = a(st1+len1);st2 = st1+len1+1; % starting index for second channel
y2 = a(st2: st2+len2-1); len3 = a(st2+len2);st3 = st2+len2+1; % starting index for third channel
y3 = a(st3: st3+len3-1); len4 = a(st3+len3);st4 = st3+len3+1;% starting index for fourth channel
y4 = a(st4: st4+len4-1);
This is taking data from a text file and outputting different values for y (i.e y2 = 1524×1 double).
I know there's a simpler for loop I can do but I can't seem to get it right! Can you help?
Best Answer