Dear Sir or Madam,
Good morning, I've two questions about the operation of the matrix, and do wish you can kindly solve which for me.
1. The first question is about normalizing the elements in the matrix.
There is a matrix A, and I would like to normalize the elements in A.
By other means, the sum of each row in A is equivalent to 1.0.
For example;
A is a 2X3 matrix,
A=[0.2 ,0.8, 0.3; 0.2, 0.4, 0.4]
And I hope it'll be normalized to
B=[0.2/(0.2+0.8+0.3), 0.8/(0.2+0.8+0.3), 0.3/(0.2+0.8+0.3);
0.2/(0.2+0.4+0.4), 0.4/(0.2+0.4+0.4), 0.4/(0.2+0.4+0.4)]
How can I get the matrix B? Thank you.
2. The second question is about expanding the multiply operation of two matrices.
There are two matrices A and B, and I would like to expand these two matrices by
the multiply operation.
For example;
A and B are 2X3 matrices both,
A=[a1, a2, a3; a4, a5, a6], B=[b1, b2, b3; b4, b5, b6]
And I hope it'll be multiplied to a 2x9 matrix, such as
A x B= [a1*b1, a1*b2, a1*b3, a2*b1, a2*b2, a2*b3, a3*b1, a3*b2, a3*b3;
a4*b4, a4*b5, a4*b6, a5*b4, a5*b5, a5*b6, a6*b4, a6*b5, a6*b6]
How can I get the matrix AxB? Thank you.
Really thank you so much.
