I guess something is wrong with this I believe. I have an array of data set I'm trying to perform some analysis on. This is what I want to do. Say for example the following is the array
signal=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...], I want to take the data points 0:3 stored somewhere, I need them and also replace those 0:3 with zeros. This is how I did it but the final result comes out right but the stored 0:3 data points stored also come out to be zeros. Can anyone help me out here. I thought it was something simple to do but I have been battling with this for the past couple of days. Thanks in advance!
here is my code:
n = len(signal)
for i in range(n):
first_3points = signal[0:3]
signal[0:3] = 0
trancated_signal = signal
I will be very glad to see where I went wrong!
signal[:3] = [0, 0, 0].