block matrix multiplication for solving large linear equation systems

hello all
i am working with a huge matrix and trying to do matrix computations in blocks.
i am trying to derive a matrix from my original matrix and then i want to multiply the new matrix with my original matrix and store it in another matrix.
i start out by first generating my original matrix using a function in matlab and then use that matrix to get the new matrix. however as my matrices are big, i have to do block multiplication.
however i cannot figure out how to calculate all the blocks.
i use 2 for loops but the code only generates the block multiplication data for the first column ad the code ends
i tried to implement the code for a smaller part of the data(5blocks*5blocks) which if successful i could implement for the whole data(48*48), but it did not work. --- each block is a 1000*1000 matrix in itself ---
please suggest something

5 Comments

Is it a block matrix or a block-diagonal matrix? Or did I misunderstand and you are not dealing with a block(-diagonal) matrix, but a completely dense matrix, and you want to implement an approach by block?
It is a sparse positive definite symmetric matrix.. sparse as value are really close to zero but not zero
Sparse implies elements identically equal to zero, which are not stored in memory at all. This is why I asked if it was a block, block-diagonal or dense matrix. If it were a block-diagonal matrix with 48 blocks of 1000x1000 non-zero elements on the diagonal, you could easily store it and compute with it (it would take a little less than 800MB of RAM when stored as a 48e3x48e3 sparse matrix with 48e6 non-zero elements). But I suspect that you are not dealing with a block-diagonal matrix, otherwise you could solve 48 small independent systems.
No i cannot generate the complete matrix at once.
I understand that you want to multiply two large matrices in MATLAB. Have you considered using the function matfile. The documentation for 'matfile' says that you can write and read from a MAT-file without loading the entire variable into memory. You could then save each of your two matrices as MAT-files, and then solve for each entry in your final matrix and save it directly into a final MAT-file as you solve for the values.

Sign in to comment.

Answers (0)

Asked:

on 10 Aug 2015

Commented:

on 12 Aug 2015

Community Treasure Hunt

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

Start Hunting!