how to create a very large matrix using matlab -
I have a problem with matlab when I am trying to make AA matrix with a large size like 40000x40000.
For example:
x = zeros (4000040000);
The error message has "exceeded the maximum variable size allowed by the program."
There is no solution.
In addition to this I have another question, can we create matrix with matrix like variable column sizes?
40000 * 40000 * 8 bytes per number = 12 GB, of course you will not have enough memory .
To create a huge lot of zeros with the matrix, you need a sparse matrix :
m = sparse (40000, 40000)
To create an array of variants, you can use the cell array :
M = Room (3, 1) m (1) = [1,2, 3] m (2) = [2,4,6,8,10] m (3) = 6 + 6i
Comments
Post a Comment