LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove NaN

Solved!
Go to solution

still cant work

0 Kudos
Message 11 of 40
(1,444 Views)

@TiTou wrote:

you'd be slower on large arrays 😛


Can you explain how it would be slower depending on the array size? Smiley Indifferent

-----

The best solution is the one you find it by yourself
0 Kudos
Message 12 of 40
(1,439 Views)

@nyp123 wrote:

still cant work


What is the problem you are facing now?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 13 of 40
(1,438 Views)

i took method 1! this is just what i need! Thanks! Heart 

now i need to show the column of "2000776707"...any ways?

0 Kudos
Message 14 of 40
(1,436 Views)

I suspect you wouldn't see any difference for small arrays (less than 100 000 values) and also the diffence between the 2 methods would tend to be smaller as the number of NaN increases in the array.

 

I think my solution is quicker because I only test the array once with the "is NaN?" primitive and then my only will only run once for each NaN in the array, whereas your solution will explicitely test each value separately.

 

That said I could be wrong if the compiler was clever enough to paralelize your for loop Smiley Surprised


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 15 of 40
(1,426 Views)

Ni nyp,

 

you already do the filtering by serial number"... What else do you need here?

 

@TiTou:

You could also get rid of the "IsNaN" comparison and search directly for NaNs. No need for creating a (large) boolean array...

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 16 of 40
(1,446 Views)

As i am required to show the top column of the array like the one in "2000776729" , i cant show it in the array of "2000776729".

0 Kudos
Message 17 of 40
(1,439 Views)

@GerdW wrote:

 

 

@TiTou:

You could also get rid of the "IsNaN" comparison and search directly for NaNs. No need for creating a (large) boolean array...



when i tested that in LV8.6 it was slower (in the case of large array containing a handfull of NaNs) but I guess you must be right now!


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 18 of 40
(1,434 Views)

I just made a quick Benchmark for performance.

 

 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 19 of 40
(1,427 Views)

Hi P Anand,

 

never benchmark structures running in parallel...

 

@nyp:

What is a "top column"?

 

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 20 of 40
(1,410 Views)