Update: No, since you don't show us the contents of the function and only give two values of the
output. It could be as simple as it added 24 to the Amatrix(3,1) term.
Are you showing us everything that was ran?
We are seeing where Amatrix is initialized to and have no idea
what else the script or function you ran does? You don't show the whole script.
It is named script_header_template so
someone must have modified it. We see Amatrix being initialized to set of values and see the words
Calculations. You don't show the calculations part.
However, the command you show only gives 2 values so we only know what happenned to
two values. .
If you entered
Amatrix = [2,5,8,5;10,9,1,4;6,3,2,10];
(or did you mean Amatrix= [2,5,B,5;10,9,1,4;6,3,2,10];
You should get
10 6 (if you script did nothing else) and not 10 30
This commands show just 2 values of the matrix.
so you are not showing everything you did .
If you did only the two steps above , you
will always get 10 6
because the matrix is
[ 2 5 8 5
10 9 1 4
6 3 2 10 ]
So the function did not change 10 , it is still 10
but it turned 6 into 30
You can turn 6 into 30 a lot of ways
add 24 or multiply by 5 or multiply by 4 and add 6 or any other way you like.
so if you only enter one indices in a 2 dimensional matrix
you go down column one 1st , then column 2
Amatrix(1) = 2;
Amatrix(2) = 10;
Amatrix(3) = 6 ;
Amatrix(4) = 5;
Amatrix(5) = 1;
and so on
so you must have done more than you are showing.