Matlab大矩阵乘法极限

Matlab大矩阵乘法极限,matlab,matrix-multiplication,Matlab,Matrix Multiplication,我试图运行下面的代码,但是当我的矩阵超过10000列时,Matlab就会冻结。我能做些什么来解决这个问题 X = load('iris.mtx'); [n,d] = size(X); %X=14000x128 double %form RBF over the data: nms = sum(X'.^2); %nms becomes 14000x1 %here is where the crash begins, for a smaller data size, like 10000x128,

我试图运行下面的代码,但是当我的矩阵超过10000列时,Matlab就会冻结。我能做些什么来解决这个问题

X = load('iris.mtx');
[n,d] = size(X);
%X=14000x128 double
%form RBF over the data:
nms = sum(X'.^2); %nms becomes 14000x1
%here is where the crash begins, for a smaller data size, like 10000x128, this part wont freeze
K = exp(-nms'*ones(1,n) -ones(n,1)*nms + 2*X*X');

这是我必须接受的限制吗?我需要能够使用这个矩阵,它比我目前使用的要大得多

我将参考之前提出的关于Matlab矩阵大小限制的问题:

唯一的限制是硬件的限制

由于不知道你需要做什么,我不能建议你进一步阅读。然而,随着矩阵的大小变得比内存大,这个问题解决了优化操作的问题