03-06-2015 01:25 PM
Im pretty bad at wording this so bare with me. I have a 1D array of eight values, and another 1D array of lets say 800 values. i would like to subtract the first element of the first array from the first 100 elements of the second array, then the second element of the first array from elements 100-200 of the second array, third element first array from elements 200-300, and so on... I am trying to do it now with a for loop but i cant quite get it
i would ultimately like an output 1D array of all the 800 values, just with the new values after subtraction.
Anyone have advice for hwo to wire this to a loop?
I know its hard to understand, especially without a picture or VI but theres a lot of other stuff going on in my VI that would just pose more confusion for anyone that opened it.
Help is appreciated!!
Solved! Go to Solution.
03-06-2015 01:32 PM
Seems simple enough. What have you tried?
03-06-2015 01:37 PM - edited 03-06-2015 01:37 PM
03-06-2015 01:57 PM
Not exactly, I tried pulling an index from the array of eight and incrementing the value by one and wanted the loop to perform it for each incremented value, but i dont know how to specify i want each increment to do a specific set of 100 values, i also cant figure out how to build a 1D array of all the values following eachother.
I tried the one you posted, not exactly what im looking for, not sure if its because i was trying to execute it without waveforms and just values, but it still gave me a 2D array and wasnt outputting all of the values
03-06-2015 02:07 PM
03-06-2015 02:25 PM
No i have labview 14 so thats not the problem. Actually trying to recreate what youve shown, I cant even attach my arrays the way you did; when connecting the array of 8 i get an error: wire connected to an output terminal
03-06-2015 02:35 PM
Im really just looking for a way to simply do this in a loop, just trying to avoid having to pull eight seperate indices out as individual elements and send each of those through a seperate subarray and so on and so on im still pretty new to labview so i could do what i need to do with a lot of coding, just trying to learn new functions that can save me time and space
03-06-2015 02:51 PM
03-06-2015 03:10 PM
@libbyherself wrote:
I cant even attach my arrays the way you did; when connecting the array of 8 i get an error: wire connected to an output terminal
A wire can only have exactly one data source. I generate fake data and use indicators to display them. In your case you would delete the data generation on the left and change the indicators to controls (right-click...change to control).
03-06-2015 03:16 PM - edited 03-06-2015 03:16 PM