LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

spectrum measurement node NaN error

Solved!
Go to solution

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:

 

uwb.PNG

My result is this array:

 

uwb_nan.PNG

 

 

I am not sure, but when I pass my array through this node, it is giving back NaN values. Does anyone have a fix?

0 Kudos
Message 1 of 17
(1,761 Views)

@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.

0 Kudos
Message 2 of 17
(1,748 Views)

here it is, sorry I cant really post the VI. NDA reasons

0 Kudos
Message 3 of 17
(1,740 Views)

The file is read into a one dimensional array of 100000 elements.

0 Kudos
Message 4 of 17
(1,736 Views)

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:

 

altenbach_0-1676410886444.png

 

0 Kudos
Message 5 of 17
(1,724 Views)

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.

 

0 Kudos
Message 6 of 17
(1,714 Views)

@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?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 7 of 17
(1,712 Views)

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.

0 Kudos
Message 8 of 17
(1,699 Views)

Alas... I just replaced all of the numbers between .001 and -.001 with zero and that didn't solve it.

0 Kudos
Message 9 of 17
(1,692 Views)

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!

0 Kudos
Message 10 of 17
(1,691 Views)