I have a matrix A = 1201×50. I would like to select a range of 30 rows at a time to analyse it (1-30, 31-60, 61-90…).
To explain better: I would like to find the bandpower of every 30 rows in all 50 columns (end up with a 40 x 50).
The easiest but very time consuming to write would be to select every single row range:
fs = 300freqrange = [7 11]Aa = bandpower(A((1:30),:),fs,freqrange);Ab = bandpower(A((31:60),:),fs,freqrange);Ac = bandpower(A((61:90),:),fs,freqrange);Ad = bandpower(A((91:120),:),fs,freqrange);(....) FPOWER_Reward_7_11 = [Aa;Ab;Ac;Ad...]
But since I'll have to run a lot of frequency ranges, I would like a faster way of running this, without having to write each range of 30 (it will be 40 lines per frequency range). Is there a way to make this row selection easier and faster?
Thank you!
Best Answer