07-02-2012 11:39 AM
how do i delete the 0s from this array? Its been a while and I am still trying to learn how to do this. thanks
Solved! Go to Solution.
07-02-2012 11:43 AM
Just right click the element. I think it's under data operations delete element.
07-02-2012 11:43 AM
Right Click on the element, go to data operations, choose delete.
07-02-2012 11:45 AM
i have another subvi that creates this array.
i just need to delete 0s somehow.
i need to write a loop to delete it but nothing seems to work
07-02-2012 11:49 AM
HINT: For Loop, case structure, build array, shift register, "Equal to 0?"
07-02-2012 11:50 AM
Please post what you have tried.
I would recommend you look at the help files for "Search 1D Array" and "Delete from Array".
I would also recommend you do a forum search.
07-02-2012 11:50 AM
Hi,
here is a snippet to do that. Copy to desktop and drag onto VI.
07-02-2012 11:52 AM
Do you only need to delete from the beginning (all up to the first non-zero value) or throughout the entire array?
If the former, use a for loop with the termination set to exit when a non-zero value is found. Take the iteration, feed that into a subarray primitive.
If the latter, use the Search 1D Array function to find the 0s and Delete from Array to remove the elements.
07-02-2012 11:57 AM
Mark, the appropriate function to use in 99% of the cases is Build Array, not Insert into Array.
07-02-2012 12:01 PM
Agreed, thanks for the reminder