Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Change matfile on harddrive
1 回表示 (過去 30 日間)
古いコメントを表示
Hi.
I am working a project with very much data. At one point I have to allocate space to a matrix that exceeds the capability of my computers RAM. As an example:
test = zeros(1000000, 14000);
This request cannot be made because "test" takes up 112 GB.
I then thought I could store the matrix on my harddrive and alter it without loading it entirely. Using:
save('test.mat', 'test', '-v7.3');
x = matfile('test.mat', 'Writable', true);
x.test(:, 123) = ones(1000000, 1);
This should change column 123 in the matfile on my harddrive to ones. My problem is that I cannot create the matrix to begin with, because it is too big.
I have then tried using:
test = sparse(1000000, 14000);
save('test.mat', 'test', '-v7.3');
x = matfile('test.mat', 'Writable', true);
This is all good, but when I try to rewrite the file,
x.test(:, 123) = ones(1000000, 1);
I get the error "Can't write file >PATH<".
Is there any way to save a matrix like the first example without first making it in your workspace? Or is there a way to rewrite the sparse matrix saved on the harddrive?
THANKS :D
0 件のコメント
回答 (0 件)
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!