필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Taking a tiny part of a huge matrix still matters to calculaltion time ?

조회 수: 1 (최근 30일)
Jeon
Jeon 2013년 8월 12일
마감: MATLAB Answer Bot 2021년 8월 20일
Say I have a matrix 'A' sized 10000 x 1000
But I just use A(1:10, 1:10) for a certain purpose.
Of course, it takes shorter time than A(:, :)
But, is it slower significatly than when use matrix B sized 10 x 10 ?
size(A)
ans = 10000 10000
tic
some_calculation( A(1:10, 1:10) );
toc
size(B)
ans = 10 10
tic
some_calculation( B(1:10, 1:10) );
toc

답변 (1개)

per isakson
per isakson 2013년 8월 12일
Because the sub-matrix is not in a contiguous piece of memory.

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by