Multiplexing varibles by subscripts

new topic     » topic index » view thread      » older message » newer message

Hi Everybody:
First, I will like to thank you for your help in advance.

I was looking at how to count and add a variable's subcripts


Ex.
I have a set of 20 variables
the variables contain three subcripts

ex
Variable #1 is sequence with three subcripts
{ 8,1,5}

I want to compare the list of 10 variables with 4 variables
that were selected at random with  a Rand(10) = VariableX function



so, if the rand function gave me a value of 10... the rountine will find 

the 10Th variable from the list of the 10 variables and put the 2nd 
subcript of the 10th variable 
into a temp variable for counting.

the routine would need to check 4 random selected values and see which 
of the 4 contain one of two
values in the subscript. THe values being 1 or 0

let's say


of the 4 random variables  when compared with the listofvariables  would 
have selected

variable#1, with subscript#2 at 1
variable#2, with subscript#2 at 0
variable#7, with subscript#2 at 1
variable#8, with subscript#2 at 1

the routine would give the following result

1) total 1 = 3
2) total 0 = 1

I tried to put the subsript into another variable but it will not let me

ex

x = variable[2]

I also tried putting the value of x into a variable subcript with no 
luck

variable[2] = x


Any help would be appreciated

Regards
Shep

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu