06-19-2014 07:22 AM
Dear anyone,
I have written a code which calculates averages for 26 different groups. Attached the sample code in .txt file for reference. I would like to put it in a FOR loop to avoid writing a lenghthier code to calculate averages for 26 different groups. Attached code contains average calculation for 2 groups.
Request you to help for the same.
Regards,
X. Ignatius
07-04-2014 01:19 AM
Morning Ignatius,
Do you need to access numbered data like "myChannelName0", "myChannelName1", ... "myChannelNameN"; member of numbered groups?
In this case you may use the string function "Str()" like:
For i = 1 to N
Dim currCannelName = baseChannelName + Str(i)
Next ' i - number of...
For groups you may use it like:
For j = 1 to M
Dim currGroupByIndex = "[" + Str(i) + "]"
Next ' j
Then the given channel of the given group index can be like:
currChannelName = currGroupName + "/" + baseChannelName + Str(i).
Have I undertsand your question well?
Best regards
Gábor
07-04-2014 01:21 AM
Hi,
Sorry, all with "Dim" was not correct, it shall look like this:
For i = 1 to N
Dim currChannelName : currChannelname = baseChannelName + Str(i)
Next
(Consider the ":").
Sorry, I was too fast by typing
Regards
Gábor