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.

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 16
(1,206 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 16
(1,193 Views)

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

0 Kudos
Message 3 of 16
(1,185 Views)

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

0 Kudos
Message 4 of 16
(1,181 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 16
(1,169 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 16
(1,159 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 16
(1,157 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 16
(1,144 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 16
(1,137 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 16
(1,136 Views)