cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Remove NaN

¡Resuelto!
Ir a solución

How do i remove the NaN in "output/input" array. Also i need to display the top column of "200077670" array like "2000776729".

Descargar todos
0 kudos
Mensaje 1 de 40
19.988 Vistas

When you divide a 0 by 0 it will give you NaN. Check the values coming in the denominator is a non-zero value since you are trying to calculate percentage (I Guess).

 

Good Luck.

-----

The best solution is the one you find it by yourself
0 kudos
Mensaje 2 de 40
19.975 Vistas

Some of my denominator has values. Is it possible to display it in "0" instead of NaN for both non values and with values? 

Mensaje 3 de 40
19.951 Vistas
yes you have to check the values as NaN if true pass 0 else pass the value. You can perform this inside the for loop.
-----

The best solution is the one you find it by yourself
0 kudos
Mensaje 4 de 40
19.946 Vistas

something like this?? not very good in this...new to LV

0 kudos
Mensaje 5 de 40
19.931 Vistas

I use this to remove NaN from my arrays, hope this helps.

 

Example_VI_BD.png


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

Epictetus

Antoine Chalons

Mensaje 6 de 40
19.924 Vistas

Thanks Emoticono felizthat was good but i am required to show the "0" array instead of removing itEmoticono frustrado

0 kudos
Mensaje 7 de 40
19.921 Vistas

well then just replace the "delete from array" primitive with a "replace array subset primitive" or better with an inplace structure.

 

Example_VI_BD.png


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

Epictetus

Antoine Chalons

Mensaje 8 de 40
19.916 Vistas
Solución
Aceptado por nyp123

I generally use the following method. 1st one replace the NaN with 0 and the 2nd removes the NaN.

 

Array_NaN remove.png

 

Good Luck.

-----

The best solution is the one you find it by yourself
Mensaje 9 de 40
19.907 Vistas

you'd be slower on large arrays 😛


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

Epictetus

Antoine Chalons

0 kudos
Mensaje 10 de 40
19.904 Vistas