table2vecΒΆ

This function is used to convert vector data in the Lua table into vector format inside Spin-Scenario. It is also helpful if you wish to use write function to save raw data into file.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 -- Do something to create the raw vector data e.g. a list of experiments that each one will return a desired value.
 local usr_table ={}
 for i = 1, 100 do
   usr_table[i] = i
 end

local v = table2vec(usr_table)

-- Do something else e.g. save it to file or plot the data.
write("vector.txt", v)