09-22-2013 03:06 PM
Hello everyboday,
So far I have this
After the user inputting the array elements, I want the program to remove negative elements and replace them with null,
Meaning simply removing them.
Here however, the program is replacing the negative elements with the value of zero, and I don't want that, I don't know with what I should replace the constant zero, or even if the whole program is correct.
Excuse me, but I'm still new to lab view, any help will be much appreciated !
09-22-2013 03:11 PM - edited 09-22-2013 03:16 PM
Null is not a valid DBL numeric. Can you explain what you want as replacement for negative values? (e.g. NaN). Or do you want to make the output array smaller by removing the negative elements and making the output array shorter??
Your code is about 90% too complicated. Learn about autoindexing!!!
What is your LabVIEW version? Do you have conditional tunnels?
In any case, this looks like homework. There are plenty of examples in the forum that show how to do all that. Did you try a search?
09-22-2013 03:22 PM
That's what I mean removing all the negative values, having a smaller array yes!.
And I have the 2011 version
09-22-2013 04:08 PM
So what is giving you problems?
09-22-2013 04:10 PM - edited 09-22-2013 04:28 PM
With Build Array/shift register and also the new conditional tunnel.
EDIT: Fixed lower loop.
09-22-2013 04:14 PM - edited 09-22-2013 04:36 PM
@RavensFan wrote:
With Build Array/shift register and also the new conditional tunnel.
(original image deleted, new one is OK)
Your lower version will not work. Is that intentional? 😄
09-22-2013 04:23 PM
Dohhh. Not intentional. I started with the upper loop. Copied, then broke the shift register. But forgot to delete the empty array constant. The broken shift register turned into an auto-indexing tunnel.
For that matter, the conditional terminal didn't exist in 2009 which is how I saved my snippet.
For that matter, my snippet is no longer a snippet. Because the forums are so broken and won't allow certain file types anymore, I had to resave the image as a jpeg from a .png.