02-14-2023 02:46 PM
Hello, I'm just trying to see if anyone else has had this problem. I tried passing this array (uwbData.txt) to the spectrum measurement node with these parameters:
My result is this array:
I am not sure, but when I pass my array through this node, it is giving back NaN values. Does anyone have a fix?
Solved! Go to Solution.
02-14-2023 03:03 PM - edited 02-14-2023 03:04 PM
@JAvela555 wrote:
I tried passing this array (uwbData.txt) to the spectrum measurement node with these parameters:
You forgot to attach the file. Also include the VI so we can tell how things are wired up and how you read the file.
02-14-2023 03:07 PM
here it is, sorry I cant really post the VI. NDA reasons
02-14-2023 03:14 PM
The file is read into a one dimensional array of 100000 elements.
02-14-2023 03:39 PM - edited 02-14-2023 03:41 PM
Where does that file come from? Do you have control over the code that writes it? It seems like a complete waste to save with 60+decimal digits. Most of the later points are zero or negative zero, so something got lost in translation. Maybe you want to save in a scientific format so things don't fall off.
You only have about 16 valid digits, and they roll off the right edge for the later points:
02-14-2023 03:43 PM
the file is generated from a series of equations. however it is always kept in an array on the vi (never extracted to a file), I only extracted the array to provide it here. I tried multiplying each variable by 100,000 but that didnt work, the ending is supposed to be zeros since it takes a multitude of waveforms.
02-14-2023 03:45 PM
@JAvela555 wrote:
the file is generated from a series of equations. however it is always kept in an array on the vi (never extracted to a file), I only extracted the array to provide it here. I tried multiplying each variable by 100,000 but that didnt work, the ending is supposed to be zeros since it takes a multitude of waveforms.
And why are those values so small? almost zero, are you sure the values are correct?
02-14-2023 03:56 PM
yes, they are. around the 2000th number it should be .99. the values should be between 1 and -1 but for the full duration the numbers linger around zero. which is why they are so small.
02-14-2023 04:04 PM
Alas... I just replaced all of the numbers between .001 and -.001 with zero and that didn't solve it.
02-14-2023 04:05 PM
All interesting data is in the first 5k points of 100k points. The rest is up to 60 orders of magnitude less. Your data file could be 100x less and still have all relevant information. Something is NOT reasonable!