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.