Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Removing some elements from array based on a condition
Post: Removing some elements from array based on a condi...

Hi, I have this matlab code A(A> numel(B)) = [ ]; where A and B are two arrays. The code above, as I interpreted it, removes some of the elements in the A array based on the condition in the bra...
claw91 General Coding Help 0 1,519 Oct-27-2020, 03:42 PM
    Thread: Convolution "same" in Python doesn't work as Matlab
Post: RE: Convolution "same" in Python doesn't work as M...

(Sep-30-2020, 02:46 PM)DeaD_EyE Wrote: You can trim the second array to the same size of the first array. The other options for mode aren't helpful. How is matlab doing this? What do you mean by "h...
claw91 Data Science 4 3,765 Oct-01-2020, 08:59 AM
    Thread: Convolution "same" in Python doesn't work as Matlab
Post: RE: Convolution "same" in Python doesn't work as M...

(Sep-30-2020, 12:22 PM)DeaD_EyE Wrote: If M < N, then max(M, N) == N Why should M be bigger than N? I use the convolve function to smooth graphs. The array M should be smaller than N. If M <...
claw91 Data Science 4 3,765 Sep-30-2020, 01:58 PM
    Thread: Convolution "same" in Python doesn't work as Matlab
Post: Convolution "same" in Python doesn't work as Matla...

Hello, I'm trying to replicate Matlab's convolution aka conv function. Matlab's conv works like this: Quote:w = conv(u,v,shape) returns a subsection of the convolution, as specified by shape. For e...
claw91 Data Science 4 3,765 Sep-30-2020, 09:05 AM
    Thread: numpy in1d with two simple arrays
Post: RE: numpy in1d with two simple arrays

(Sep-19-2020, 12:16 AM)scidam Wrote: I suspect that you want to do something like this L[np.in1d(L+1, L)]. But I cann't understand why you have 11 in the result array stated as correct. Neither L, n...
claw91 General Coding Help 3 2,601 Sep-21-2020, 09:46 AM
    Thread: numpy in1d with two simple arrays
Post: numpy in1d with two simple arrays

I have this Matlab code T = L(find(ismember(L+1,L))); and I want to replicate it into Python. This is my L array L = np.array([ 1, 3, 5, 7, 12, 13, 14, 15, 16, 17, 18, 24, 25, 27, 29, 30, 31, 3...
claw91 General Coding Help 3 2,601 Sep-18-2020, 02:58 PM
    Thread: Removing rows from array
Post: RE: Removing rows from array

Thank you. Can you please explain why my second argument FILE[0:985,...]is not the same as yours range(985)?
claw91 General Coding Help 3 2,210 Sep-18-2020, 01:50 PM
    Thread: Removing rows from array
Post: Removing rows from array

Hello, I want to replicate this Matlab code into Python FILE(1:985,:) = [ ]; FILE is an nx2 array. n si quite large but it's not important. If I understand correctly, the code should remove from th...
claw91 General Coding Help 3 2,210 Sep-17-2020, 02:58 PM
    Thread: scipy.signal.find_peak VS Matlab's findpeaks function
Post: RE: scipy.signal.find_peak VS Matlab's findpeaks f...

(Sep-15-2020, 11:36 AM)buran Wrote: Comparing the output - Matlab identify some peaks that python did not and vice verse Yes, that's pretty apparent. The question is why this happens and how can I ...
claw91 Data Science 2 5,487 Sep-15-2020, 12:27 PM
    Thread: scipy.signal.find_peak VS Matlab's findpeaks function
Post: scipy.signal.find_peak VS Matlab's findpeaks funct...

I'm interested in finding positive and negative peaks in a data sample with Python. To give you a better idea, I'm considering Matlab's findpeaks function (https://it.mathworks.com/help/signal/ref/fi...
claw91 Data Science 2 5,487 Sep-15-2020, 10:47 AM
    Thread: scipy.signal findpeaks
Post: RE: scipy.signal findpeaks

(Sep-11-2020, 10:21 AM)buran Wrote: you can post the code here, or if too long - make a repo (e.g. on github) Is it ok if I make a new thread using some pastebin (which does not expire) just for the...
claw91 Data Science 10 7,242 Sep-15-2020, 09:53 AM
    Thread: scipy.signal findpeaks
Post: RE: scipy.signal findpeaks

how to edit the original post? The code paste link is not working anymore
claw91 Data Science 10 7,242 Sep-11-2020, 10:19 AM
    Thread: scipy.signal findpeaks
Post: RE: scipy.signal findpeaks

Do you guys know if there's any difference betweeb Matlab's findpeaks and Scipy signal findpeaks? Docs for Python here https://docs.scipy.org/doc/scipy/referen...peaks.html shows a lot of parameters...
claw91 Data Science 10 7,242 Sep-10-2020, 07:41 AM
    Thread: scipy.signal findpeaks
Post: RE: scipy.signal findpeaks

If you need additional info I can provide... there's almost 200 views but no actual contribution here :(
claw91 Data Science 10 7,242 Sep-03-2020, 12:13 PM
    Thread: scipy.signal findpeaks
Post: RE: scipy.signal findpeaks

So uh, guys? Anybody willing to help?
claw91 Data Science 10 7,242 Aug-31-2020, 10:35 AM
    Thread: scipy.signal findpeaks
Post: RE: scipy.signal findpeaks

(Aug-28-2020, 09:59 AM)deanhystad Wrote: Documentation says the function may return unexpected results for data containing NaNs. Does your fh data contain NaNs? it doesn't
claw91 Data Science 10 7,242 Aug-28-2020, 10:06 AM
    Thread: scipy.signal findpeaks
Post: scipy.signal findpeaks

Hello there. I'm new to Python and my goal is to replicate Matlab's findpeaks prebuilt function. The goal is to find positive and negative peaks. In Matlab you just give as parameters the data and th...
claw91 Data Science 10 7,242 Aug-28-2020, 09:28 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020