Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Functions of the elements of a matrix

I have a matrix say

M=[[10,12],[25,2]]

And I would like to create a function of the type

$f_1(M,i)=2M[i][0]+3M[i][1]$

I perfectly understand that neither M[i][0]nor M[i][1]are declared variable. Is there a solution to my problem ? Or should I explore an other way ?