Hi,

Can we define 2-dimensional variables in ADS Ptolemy?

For example, I specify a 2-D array as shown:

Freq = { {1e9, 2e9}, {1.5e9, 2.5e9}, {2e9, 3e9} }

When I tried to reference the variable 1e9, by Freq[1,1], I get an error of

"incorrect number of indices for array".

Can we define 2-dimensional variables in ADS Ptolemy?

For example, I specify a 2-D array as shown:

Freq = { {1e9, 2e9}, {1.5e9, 2.5e9}, {2e9, 3e9} }

When I tried to reference the variable 1e9, by Freq[1,1], I get an error of

"incorrect number of indices for array".

Here is what I found. It seems that 2-D arrays get converted into 1-D arrays as described below. If X = { {1, 2}, {3, 4}, {5, 6} } represents the 3x2 array:

it seems to get converted to the 1-D array

[ 1, 3, 5, 2, 4, 6], so

X[1] = 1

X[2] = 3

X[3] = 5

X[4] = 2

X[5] = 4

X[6] = 6