0

I have a table containing the following three columns:

a                 b                 c                
----------------- ----------------- -----------------
0.133979108417407 1.754130915272981 1.42329662386328 
0.668288746615872 0.734417136292905 0.732997396495193
0.862356088589877 1.797701210249215 0.393919392488897
0.629761615302414 0.627890981268138 0.500648534856737
0.001629136269912 0.623473873827606 1.101053179707378
0.359894326189533 1.729495922103524 0.568989174440503
0.791510772192851 0.435095694381744 1.597348631359637
0.708041025325656 0.219414299819618 1.387293450068682

Now, if I want to access the 3rd value of column b, how could I do?

FFF
  • 147
  • 1
  • 8

1 Answers1

1

You can achieve this by specify column name and the row number, such tb["myColName"][0]; try the following script:

tb=table(rand(1.,50) as a,rand(2.,50) as b,rand(2.,50) as c)
tb[`b][2]
print(tb[`b][2])
wibeasley
  • 5,000
  • 3
  • 34
  • 62
Polly
  • 603
  • 3
  • 13