I am trying to replace a range of values in a multidimensional array starting at cell i,j with both greater than 0, ie a square inside the nD array. The new values that will be replacing the old ones come from a 1D array. However, when I provide both indexes to replace array subset block I am getting a bad wire... I assume that this is due to the fact that labview doesn't know which direction to replace the data?? Is there any solution to that? I am attaching an example vi of what I am trying to do.
Solved! Go to Solution.
index out the column or row where you want to replace values. In the resulting 1d array you can replace several values. Then you replace the whole row (or column) in the 2d array... Or replace just scalar values in the 2d array.
Maybe you can use the "inplace" structure of newer LabView versions for this process, but I can't test this right now...
You also seem to have a major misconception about arrays. You say you want to replace a square but you are using a 1D array. A 'square' has two dimensions. If you really want to replace a square, you need to use a 2D array.