Skip to content

Why Does math.matrixFromFunction Return A Vanilla Array/Matrix? #2910

Answered by josdejong
fweth asked this question in Q&A
Discussion options

You must be logged in to vote

In general, the idea is: Array in -> Array out, Matrix in -> Matrix out.

math.matrixFromFunction([3,3], i => i[0] - i[1])              // Array 
math.matrixFromFunction(math.matrix([3,3]), i => i[0] - i[1]) // Matrix

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fweth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants