필터 지우기
필터 지우기

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!

채택된 답변

Matt J
Matt J 2017년 12월 22일
result = kron(A,A);

추가 답변 (2개)

Walter Roberson
Walter Roberson 2017년 12월 22일
result = FirstArray .* SecondArray;

Roger Stafford
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?

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by