aboutsummaryrefslogtreecommitdiff
path: root/matrix_example.lua
diff options
context:
space:
mode:
Diffstat (limited to 'matrix_example.lua')
-rw-r--r--matrix_example.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/matrix_example.lua b/matrix_example.lua
index 1ff129d..361e126 100644
--- a/matrix_example.lua
+++ b/matrix_example.lua
@@ -4,4 +4,13 @@ t:set_elem(1, 3.23432);
print(t:get_elem(1))
print(t)
t = nerv.FloatMatrix(10, 20)
+t:set_elem(1, 3.34);
print(t)
+a = t[1]
+for i = 0, 9 do
+ for j = 0, 19 do
+ t[i][j] = i + j
+ end
+end
+print(t)
+print(a)