How can i multiply each elements of a 16x16 two dimensional matrix with one another to generate 256 values ?
1 次查看(过去 30 天)
显示 更早的评论
I've been trying to figure out an easy way to do this, can someone help. Thank you!
0 个评论
采纳的回答
更多回答(2 个)
Roger Stafford
2017-12-22
Suppose your 16-by-16 matrix is called M. If you really want to multiply each element of M by all other elements of M, then do this:
N = M(:);
N = N*(N.');
However the result, N, will be of dimension 256-by-256 which is 65536 elements altogether. Is that what you want?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!