Support Board
Date/Time: Sat, 11 Jan 2025 09:58:17 +0000
Post From: Using DMI in the CrossOver function
[2016-11-15 02:07:07] |
AcquaLife - Posts: 33 |
I am trying to compare the negative DMI and positive DMI for a crossover. However, the crossover function takes arrays while the data in the DMI are not arrays. I tried several ways of putting the value of the pos DMI and neg DMI in two different arrays and then using the crossover function with no luck. I also followed the code example: This is an example of looking for a crossover between the values in /// a subgraph and a fixed value. We first have to put the fixed value // into an array. We are using one of the Subgraph internal arrays. sc.Subgraph[2].Arrays[8][sc.Index] = 100.0; if (sc.CrossOver(sc.Subgraph[2], sc.Subgraph[2].Arrays[8]) == CROSS_FROM_BOTTOM) { //Code } I though i could do what you did with the sc.Subgraph[2].Arrays[8][sc.Index] = 100.00 and replace the 100 with pos DMI and another line of code with neg DMI in array 9. Also, when i used the crossover function instead of putting both DMI pos and DMI neg as arguments, I just put one in with another known array. No matter what i do i keep getting this error: 'int s_sc::CrossOver(SCFloatArrayRef,SCFloatArrayRef,int)': cannot convert argument 1 from 'float' to 'SCFloatArrayRef' This is the piece of code i am working with: sc.DMI(sc.BaseDataIn, sc.Subgraph[1], 10); float DMIPos = sc.Subgraph[1][sc.Index]; float DMINeg = sc.Subgraph[1].Arrays[0][sc.Index]; sc.Subgraph[1].Arrays[1][sc.Index]=DMIPos; sc.Subgraph[1].Arrays[2][sc.Index]=DMINeg; |