10-01-2018 12:02 AM
Hello there, I am new to LABview . can anyone help me with the block diagram of search and replacing element in an array?
Thanks a lot
10-01-2018 12:44 AM
Look at the training resources on the top of the forum. See how far you get and if you get stuck, come back with a more specific questions.
(Also note how to spell LabVIEW with the correct letter case. Make sure to include all information. Is this a string or a numeric array? Where does it come from? What should happen with the result? How does it fit into the rest of your code?)
10-01-2018 08:02 PM
1D Array, 2D array or 3D array?
Text number or boolean?
What is the size of the array?
Be specific so we can help you.
Benoit
10-02-2018 03:12 AM
@akshay321 wrote:
Hello there, I am new to LABview . can anyone help me with the block diagram of search and replacing element in an array?
Thanks a lot
Assuming a 1D array, and integers. Store this in a .vim, and it will work for any type.
10-02-2018 10:45 AM
wiebe@CARYA wrote:Assuming a 1D array, and integers. Store this in a .vim, and it will work for any type.
Yes, we still have to assume way too much. Your code searches and replaces all matching elements, while the OP was talking about "element" (i.e. not plural).
Without assuming anything, the current question cannot be uniquely answered. For example if it is just an U8 array, it could be temporarily converted to a string for a loop free version to replace all matches. If the array is DBL, we need to worry about failures of "equal" comparisons (A search only finds a match if the values are binary identical) and we might need protective code.
In any case, if the OP is still around, he might want to clarify the question as already requested.
10-03-2018 04:04 AM
@altenbach wrote:
wiebe@CARYA wrote:Assuming a 1D array, and integers. Store this in a .vim, and it will work for any type.
Yes, we still have to assume way too much. Your code searches and replaces all matching elements, while the OP was talking about "element" (i.e. not plural).
Without assuming anything, the current question cannot be uniquely answered. For example if it is just an U8 array, it could be temporarily converted to a string for a loop free version to replace all matches. If the array is DBL, we need to worry about failures of "equal" comparisons (A search only finds a match if the values are binary identical) and we might need protective code.
In any case, if the OP is still around, he might want to clarify the question as already requested.
You're right, it was just a "best guess".