Support Board
Date/Time: Mon, 10 Feb 2025 01:49:46 +0000
Post From: How to Subtract 2 arrays
[2020-08-13 15:36:50] |
User681150 - Posts: 62 |
thanks Hammer "I think" i figured it out. (documentation is all over the place with explaining this stuff, reads like random streams of thought everywhere i look) i dont think you can do calculations when declaring/initializing a variable. So first is, declare the variable, then do the calculation... 1. declare variable (only use SCFloatArray since your not going to point the variable to any data array right now) (its going to be empty) SCFloatArray array3;
2. now you can do a calculation using the variable. Because it is a calculation between these 3 data arrays (1 empty, 2 with data), you need to line up the values so everything falls into place, so need to use the [sc.Index] for each part involved. array3[sc.Index] = array1[sc.Index] - array2[sc.Index] // or plot it directly to a Subgraph
sc.Subgraph[0][sc.Index] = array1[sc.Index] - array2[sc.Index] again, i think this is the logic. even the error messages are so garbled and useless that it is hard to decipher why something went wrong. if this platform wasn't so inexpensive with data included, i wouldnt be using it, so I drudge along. thanks for the response. |