08-26-2009 06:00 AM
Hi, i'm trying to take a 2d array of I32 numbers, sellect a back ground value say 131586, that easy to detect them but the bit i'm having problem with is actaully setting the occurances into Nan so plotting them on a surface graph will leave holes which will better show my data.
i've tried the classics like deviding by 0, multiplying by infinity etc... but they all sem to return either +inf or 0.
how can i break it??
both parts attached. (data and VI)
Solved! Go to Solution.
08-26-2009 06:11 AM
Hi John,
if you have an index of 0, then you don't need the for loop, because you get only one value. The code in the attached picture should work for you.
Mike
08-26-2009 06:12 AM - edited 08-26-2009 06:14 AM
Hi John,
you know that NaN is a floating point number? And integers have a certain range of definition like I32 = {-2^31...2^31-1}.
So you can't have NaNs with integers. You have to use floats instead!
Btw. instead of calculation you can also wire a NaN constant...
08-26-2009 06:54 AM
a NaN constant is exaclty what i'm looking for, is there one in the base package?
-i've looked but no luck.
08-26-2009 07:11 AM
ah ha, sometimes fiddling does work.
you just simply type 'NaN' into the numerical are, but it has to be done in DBL for some reason.
08-26-2009 07:23 AM - edited 08-26-2009 07:23 AM
08-26-2009 07:29 AM
fair point.
(wearing hat of shame)
08-26-2009 10:59 AM
Question: i'm reading all files in the foulder, how can you exclude the thumbs.db one from the collected list?
The filter seems to allow ones with specific names through, but i want to exclude one.
can that be done with delete from array?
08-26-2009 11:08 AM
(answering own question)
Yes you can: use 'Search Array' then use its index into 'delete from array' and done
Winner!
08-26-2009 11:18 AM
John Pierson wrote:(answering own question)
Yes you can: use 'Search Array' then use its index into 'delete from array' and done
Winner!
... and for the bonus points...
If you have multiples to delete, find them all ahead of time then start deleting with the max index and work your way down. If done the other way, your indexes will change after each delete.
Ben