here is my problem:
I have raw data which is 3D ARRAY with (x,y,t) where x,y are points and t is # of samples
I want to take signals (512 samples) from 51x51, total 2601 different points and add those signals so that i can take the average
Thus, I want an array of the dimension 2601x512(512x2601 will also do i guess) and later I am planning to use 'sum' so that i can get 1x512 data
Here is what I have tried:
for iii = 1:51
for jjj = 1:51
for kkk = 1:2601
new_sig(kkk,:)=uwpi(294+iii,274+jjj,:);
end
end
end
when i do this, i get 2601x512 matrix but every row is identical which is not possible
when I try:
for iii = 1:51
for jjj = 1:51
new_sig(iii*jjj,:)=uwpi(294+iii,274+jjj,:);
end
end
In this case, some rows of new_sig have only 0s (I think this happens because of iii*jjj term)
I've also tried to use squeeze command but wasn't really getting anywhere
Can anyone point me to the right direction?
If there is a better way to do this without nested for loop, that's fine too
Thank you