02-24-2015 12:44 AM
hi,
I have 1D array as below:
2
4
where I want to copy previous cell element to next cell if it is empty.
Help me out with a program so that my final answer would be as below:
2
2
2
4
thanks in advance
02-24-2015 01:12 AM
Take your 1D array and pass it to For Loop.
Check for empty.
If empty, take previous value else pass same value.
Keep your previous value in shift registers to replace empty value (when empty value is coming).
And also, Please check what kind of data your passing (1D array of strings/numbers).
If it is numbers, LabVIEW by default it takes “0” in arrays. so you need to check for zero.
Please try & if your facing any issues, Please post your VI & ask for more info.
02-24-2015 04:13 AM
thanks for ur suggestion.
the problem with my program is that it will print element in next cell but not for the successive empty cells. I cant find out where the mistake lies.
Pls check the program and help me.
02-24-2015 04:26 AM
Check your program data flow.
Check this,
02-24-2015 05:41 AM - edited 02-24-2015 05:42 AM
Hi ,
Try this.
Regards