1

I'm trying to run the following code below, but Matlab freezes when my matrix gets beyond 10,000 columns. What can I do to fix this?

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');

Is this a limitation that I just have to accept? I need to be able to use this for matrix that are much bigger than what I'm currently using.

mugetsu
  • 4,228
  • 9
  • 50
  • 79

1 Answers1

0

I would refer to this previously asked question about limitations in the size of Matlab matrices: Matrix size limitation in MATLAB.

The only limitations are the limitations of your hardware.

Not knowing more about what you need to do I can't suggest much further reading. However, as the size of your matrices gets to be larger than you have memory for this question addresses the issue of optimizing your operations. Efficient multiplication of very large matrices in MATLAB

Community
  • 1
  • 1