필터 지우기
필터 지우기

How do I create multidim array without for-loops?

조회 수: 4 (최근 30일)
Somebody
Somebody 2013년 5월 11일
Hello.
I'd like to create a multidim array of, for example, 4-th central moments of matrix g (columnwise). I use for-loops:
K = zeros(m,m,m,m);
for l = 1:m
for k = 1:m
for i = 1:m
for j = 1:m
K(i,j,k,l) = sum(g(:,i) .* g(:,j) .* g(:,l) .* g(:,k));
end
end
end
end
where m is a number of columns in g. How do i evaluate it without for-loops? It takes too much time. thx.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by