I need to store and operate(so time of referencing operations is very important) with thriangular matrix. How to do it effectively? I think that using of sparse matrix is not efficient because we need to store indexes. May be it is better to store as 1-d cell array of 1-d "normal" arrays? Or some other way? Please help. And sorry for my poor English

댓글 수: 1

Chris Turnes
Chris Turnes 2014년 8월 8일
How large are your matrices? Can you fit the whole matrix in memory, and if not, can you fit only the non-zero coefficients in memory? Given the density of the matrix, you are correct that storing it as a sparse array will not be efficient. However, using a full matrix may still be your best option because of the efficiency of MATLAB's operations with triangular matrices.

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

 채택된 답변

Jan
Jan 2014년 8월 10일

0 개 추천

It depends on what you are doing with the matrices. When you only want to store the matrices, but do not perform any operations, a cell vector seems to be sufficient. When you need column or row operations only, this might be efficient also.
But e.g. for a matrix multiplication this would be a severe disadvantage and a full matrix is much better.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

질문:

2014년 8월 8일

답변:

Jan
2014년 8월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by