Matrix Manipulation
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hello everyone!
I am a layman for Matlab, so please forgive me if the question sounds naive. Here is my question. Let's say I have a 3x3 matrix called X:
X = [1 2 3;4 5 6; 7 8 9]
I would like to generate a new matrix Z from X such that every cell Z(i,j) will be defined as follows:
Z(i,j) = X(i,k)*X(k,j) .
where the total number of X cells which are multiplied depends on the length of the matrix.
For example, the first cell of Z will be Z(1,1) = X(1,2)*X(2,1) * X(1,3)*X(3,1)* X(1,1)*X(1,1).
Can any one tell me how to code this in matlab?
Thanks! A.
0 个评论
回答(1 个)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!