Converts a number Matrix(just returns the same matrix).
(setq X (new Matrix: number: 1 2 3.0 4)) |
Returns: #(nummat| 3.0 4.0 )
|
(setq Y (objectToNumMatrix X)) |
Returns: #(nummat| 3.0 4.0 )
|
Converts a Matrix to a Number Matrix.
(setq X (new Matrix: 1 3 1.0 2 "3")) |
Returns: #(mat| 1.0 2 "3" )
|
"3" is converted to 0.
(setq Y (objectToNumMatrix X)) |
Returns: #(nummat| 1.0 2.0 0.0 )
|
Converts a Vector to a one-dimensional matrix.
(setq X (new Vector: 3 1.0 #("2") #("3" "4")))
|
Returns: #(1.0 #("2" ) #("3" "4" ) )
|
(setq Y (objectToNumMatrix X 1 3))
|
Returns: #(nummat| 1.0 0.0 0.0 )
|
Convert a Vector to a three-dimensional matrix.
(setq X (new Vector: 12 1.0 #("2") #("3") #("4" "A") 5.0 6.0 7 8 9 "10" "11" "12")) |
Returns: #(1.0 #("2" ) #("3" ) #("4" "A" ) 5.0 6.0 7 8 9 "10" "11" "12" )
|
(setq Y (objectToNumMatrix X 3 2 2 3)) |
Returns: #(nummat[2 2 3]| 1.0 0.0 0.0 0.0 5.0 6.0 7.0 8.0 9.0 0.0 0.0 0.0 )
|
Converts a Number Vector to a one-dimensional matrix.
(setq X (new Vector: number: 5 -255.0 32.1 16.0 8.0 4.0)) |
Returns: #(num| -255.0 32.1 16.0 8.0 4.0 )
|
(setq Y (objectToNumMatrix X )) |
Returns: #(nummat| -255.0 32.1 16.0 8.0 4.0 )
|
Convert a Number Vector to a three-dimensional matrix.
(setq X (new Vector: number: 12 -1 2 128 4 127 5 254 7 8 9 10 11 12)) |
Returns: #(num| -1.0 2.0 128.0 4.0 127.0 5.0 254.0 7.0 8.0 9.0 10.0 11.0 )
|
(setq Y (objectToNumMatrix X 3 2 2 3)) |
Returns: #(nummat[2 2 3]| -1.0 2.0 128.0 4.0 127.0 5.0 254.0 7.0 8.0 9.0 10.0 11.0 )
|
Convert Object Vector of vectors to a two-dimensional matrix.
(setq X (new Vector: object: 2 #(1.0 2.0 3.0) #(4.0 5.0 6.0))) |
Returns: #(obj| #(1.0 2.0 3.0 ) #(4.0 5.0 6.0 ) )
|
(setq Y (objectToNumMatrix X )) |
Returns: #(nummat[2 3]| 1.0 2.0 3.0 4.0 5.0 6.0 )
|
Convert an Object Vector to a two-dimensional matrix.
(setq X (new Vector: object: 6 '(1.0) '(2.0) '(3.0) '(4.0) '(5.0) '(6.0))) |
Returns: #(obj| (1.0) (2.0) (3.0) (4.0) (5.0) (6.0) )
|
The elements of an object vector must be objects which always convert to 0.
(setq Y (objectToNumMatrix X 2 2 3 )) |
Returns: #(nummat[2 3]| 0.0 0.0 0.0 0.0 0.0 0.0 )
|
Convert a Dictionary to a one-dimensional matrix
(setq X (new Dictionary: A: 22 B: 34 . 3)) |
Returns: #{dic|| A 22 B 34}
|
(setq Y (objectToNumMatrix X)) |
Returns: #(nummat| 22.0 34.0 )
|
Convert a Directory to a one-dimensional matrix
(setq X (new Directory: #Jan,1,1996 "New Year's Day" #Feb,14,1996 "Valentine's Day")) |
Returns: #{dir|| #Jan,1,1996 "New Year's Day" #Feb,14,1996 "Valentine's Day"}
|
(setq Y (objectToNumMatrix X)) |
Returns: #(nummat| 0.0 0.0 )
|