【问题标题】:Matlab large matrix multiplication limitMatlab大矩阵乘法极限
【发布时间】:2012-07-28 13:52:37
【问题描述】:

我正在尝试运行下面的代码,但是当我的矩阵超过 10,000 列时,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 matrix-multiplication


    【解决方案1】:

    我会参考之前提出的关于 Matlab 矩阵大小限制的问题:Matrix size limitation in MATLAB

    唯一的限制是您的硬件限制。

    不知道更多关于你需要做什么我不能建议进一步阅读。但是,随着矩阵的大小变得大于您的内存,此问题解决了优化操作的问题。 Efficient multiplication of very large matrices in MATLAB

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-09
      • 2023-03-27
      • 1970-01-01
      • 2012-09-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多