Selecting arbitrary sequence of rows from a matrix

조회 수: 3 (최근 30일)
gujax
gujax 2018년 10월 29일
편집: gujax 2018년 10월 29일
A=100000x1 made of numbers <3000 : A=[2345,123,4000, etc...]
B=5000x100000 an array of numbers given;
Select A out of B(:,1) for each of 100000 columns.
i.e., make a new cell array out of B picking out 2345x100000; 123x100000; 4000x100000 etc elements
Thanks
  댓글 수: 3
Bruno Luong
Bruno Luong 2018년 10월 29일
You'll hard time to store them on your poor PC.
gujax
gujax 2018년 10월 29일
편집: gujax 2018년 10월 29일
Sorry, KSSV, yes 4000 is incorrect. It should be < 3000. And it should be picked up in the sequence as in A. I will have hard time storing this but the size of A is actually 5000 . I can split B in steps of 50000 columns.. I worked out something using indexing finally. Unless someone has better ideas. I will post my solution once I check it works.
Another problem I faced is that because of indexing method I had to use cumsum. The integers blew up where it reached int32 limit. Now I have to declare everything uint64. I am afraid some math later may blow this up on me. Don't know what is the best way to handle this.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by