LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete 0 from array

Solved!
Go to solution

@fabrice34259 wrote:

Hello

I try to delete rows where there is NaN in an array.

But the result is wrong.

Can you help me ?

Thanks


It is probably better to start new topic rather to append to very old one (and solved) discussion.

Anyway, when you wrote "the result is wrong", then you should explain three things: what you already done, what you expected to see, and what you saw instead.

In your VI its hard coded for column with index 3:

Screenshot 2024-05-16 08.52.51.png

So, it will obviously not work if you have NaN in other column.

If you need more generic solution, then better to do something like this:

Snippet.png

Message 21 of 25
(405 Views)

thanks for your answer, but

when input condition is thrue then  the result is wrong , there is rows with "NaN" value

when input condition is false , result is correct, all raws wich contain 'NaN' disapere

best regards

fabrice34259_1-1715844599937.png

 

 

 

0 Kudos
Message 22 of 25
(399 Views)

Hi Fabrice,

 

Have you even tried the solution sent by Andrey ?

 

To give you a hint : your VI doesn't work well when the Array contain two (or more) consecutives lines with NaN at column 3. 😉

It comes from "Delete From Array" and "Index Array" by Iteration terminal.

0 Kudos
Message 23 of 25
(386 Views)

@fabrice34259 wrote:

thanks for your answer, but

when input condition is thrue then  the result is wrong , there is rows with "NaN" value

when input condition is false , result is correct, all raws wich contain 'NaN' disapere

best regards

 


Snippet above attached as VI and downgraded to LV2018, please try it.

 

0 Kudos
Message 24 of 25
(379 Views)

Hello

I have tried solution sent by Andrey, its works very well.

Thanks

0 Kudos
Message 25 of 25
(317 Views)