From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-08-2018 04:59 AM
I have an analoge signal of low voltage noise and square signals. I want to extract all square signals from the 1D array and put them in a 2D array. The distances between the square waves are not identical. That's why, I cannot divide the 1D array into multiple 1D arrays and search for numbers bigger than the range of the noise. I would be very thankful for any help!
Solved! Go to Solution.
02-08-2018 05:08 AM
do you have more info on the separation criteria?
i see that you have lots of 0.0627 and 0.1882 followed by one or more 0s
but then 5.0824 and 5.1451 without any 0s around it
02-08-2018 05:16 AM
the 5.0824 and 5.1451 without any 0s around it is the square wave. everythings else is noise. so I have the criteria that i want to extract all numbers that are, for example, bigger than 1. If I do that, i will have a 1D array of all of those numbers after eachother. I want to extract each square signal separately. the length of the square signal is not always similar. thank you.
02-08-2018 05:39 AM
02-08-2018 06:06 AM - edited 02-08-2018 06:06 AM
Do note that if your pulses are not the same length, your shorter pulses will be padded with 0 at the end when you change to a 2D array to keep all of the rows the same length. But this code should do what you want.
02-08-2018 06:10 AM - edited 02-08-2018 06:24 AM
my try, crossrulez beat me to it 😉
EDIT: fixed corner cases
02-12-2018 03:15 AM
Thank you very much for the reply!
02-12-2018 03:15 AM
Thank you so much for the codes!! I will try them!
02-12-2018 03:47 AM
What do u mean by the 2.5 part?
02-12-2018 04:24 AM