I want to update "matrix1" 100 times. "matrix3" will be new "matrix1" and it will iterate 100 times. Should I use a loop or function? First iteration is:
matrix1 = ( {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
} );
matrix2 = matrix1*2 - 1;
matrix3 = matrix2 + 5;
matrix3
Output (First iteration):
{{6, 8, 10}, {12, 14, 16}, {18, 20, 22}}
matrix3 will be new matrix1
matrix1 = ( {
{6, 8, 10},
{12, 14, 16},
{18, 20, 22}
} );
matrix2 = matrix1*2 - 1;
matrix3 = matrix2 + 5;
matrix3
Output (Second iteration):
{{16, 20, 24}, {28, 32, 36}, {40, 44, 48}}