find indices in a large array and replace them with zeros
이전 댓글 표시
I have an index with 10 rows and 301 columns each. I also have a digital signal with 1 X 250,000 elements. The values of the initial index are isolated from the digital signal because they all have a specific characteristic and I used the following code for this:
index1 = zeros(10,151);
index2 = zeros(10,150);
for i = 1:10
index1(i,:) = signal(peak(i):(peak(i)+150));
index2(i,:) = signal((peak(i)-150):(peak(i)-1));
end
index = [index2,index1];
Up to this point everything is fine. However, I want to delete that characteristic by replacing all the index values with zeros back at the digital signal. My problem is that the element arrays in the "index", corresponding to the 10 rows, aren't neighbouring. How can I do this? Would it be easier if I make the replacement within the for loop? Thanks in advance.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!