Tall Matrix Index Extraction

조회 수: 1 (최근 30일)
Blake Van Winkle
Blake Van Winkle 2021년 1월 8일
댓글: Blake Van Winkle 2021년 1월 13일
To All:
I have a varying size model of the dimensions (L x nx)
L = number of data points
nx = number of variables per data point
In the algorithm that I am using, it moves the data around to support a search of the data space.
A small example could be this:
x = [1,2;3,4;5,6];
id =[1,6;2,4;1,5];
xnew = x(id);
disp(xnew); %[1,6;3,2;1,4];
Now while this isn't too difficult, my state "x" is in reality a tall matrix.
xtall = tall(x);
xnewtall = x(id); % crashes!
Does anyone know how to do this without having to do every individual point independently?

답변 (1개)

SaiDileep Kola
SaiDileep Kola 2021년 1월 13일
Since tall matrices are challenging in terms of memory, how about parsing arrays "xtall" and "id" and using with appropriate offsets, up on that par-for would run efficiently, this could be a bit better thatn individual point independently.
Some task on similar problem is done here.
  댓글 수: 1
Blake Van Winkle
Blake Van Winkle 2021년 1월 13일
To SaiDileep:
I appreciate the thought. This approach does reduce the time required, but it is still less efficient than if there was a total dimensional indexing solution.
Thanks,
Blake

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by