- #1
AxiomOfChoice
- 533
- 1
THIS ISN'T WORKING AT ALL!
I'm trying to define a matrix M in terms of a predefined matrix N by using the following for loop:
For[a=1,a<=12,a++,M[[a,a]]=N[[1,a]]]
So I just want the diagonal of M to be the first row of N. But this is not working at ALL. Does anyone see what I'm doing wrong?
I'm trying to define a matrix M in terms of a predefined matrix N by using the following for loop:
For[a=1,a<=12,a++,M[[a,a]]=N[[1,a]]]
So I just want the diagonal of M to be the first row of N. But this is not working at ALL. Does anyone see what I'm doing wrong?